Skip to content

Commit 171469a

Browse files
committed
fix sqlglot version
1 parent 6cd5a8d commit 171469a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tests/test_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ pandas
1717
zstandard
1818
lz4
1919
pyjwt[crypto]==2.10.1
20-
sqlglot
20+
sqlglot==25.24.0 # same as superset
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
import timeplus_connect.tp_sqlglot.dialect

timeplus_connect/tp_sqlglot/dialect.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,8 @@ class Generator(generator.Generator):
917917
exp.DataType.Type.DECIMAL32: "Decimal32",
918918
exp.DataType.Type.DECIMAL64: "Decimal64",
919919
exp.DataType.Type.DECIMAL128: "Decimal128",
920-
exp.DataType.Type.DECIMAL256: "Decimal256",
920+
# superset use the sqlglot with version 25.24.0 which is not support DECIMAL256.
921+
# exp.DataType.Type.DECIMAL256: "Decimal256",
921922
exp.DataType.Type.TIMESTAMP: "DateTime",
922923
exp.DataType.Type.TIMESTAMPTZ: "DateTime",
923924
exp.DataType.Type.DOUBLE: "float64",
@@ -978,7 +979,8 @@ class Generator(generator.Generator):
978979
exp.JSONPathKey: json_path_key_only_name,
979980
exp.JSONPathRoot: lambda *_: "",
980981
exp.Map: _map_sql,
981-
exp.Median: rename_func("median"),
982+
# superset use the sqlglot with version 25.24.0 which is not support Median.
983+
# exp.Median: rename_func("median"),
982984
exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
983985
exp.Pivot: no_pivot_sql,
984986
exp.Quantile: _quantile_sql,
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
import timeplus_connect.tp_superset.db_engine_spec

0 commit comments

Comments
 (0)