summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_clickhouse.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-10 11:29:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-10 11:29:00 +0000
commit74b38d30f43f7005428e09fa80508c5f21324c99 (patch)
tree7a0d4e49fffdc0330fc941c6528d3c8669a2acc6 /tests/dialects/test_clickhouse.py
parentAdding upstream version 6.2.8. (diff)
downloadsqlglot-74b38d30f43f7005428e09fa80508c5f21324c99.tar.xz
sqlglot-74b38d30f43f7005428e09fa80508c5f21324c99.zip
Adding upstream version 6.3.1.upstream/6.3.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_clickhouse.py')
-rw-r--r--tests/dialects/test_clickhouse.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/dialects/test_clickhouse.py b/tests/dialects/test_clickhouse.py
index e5b1516..715bf10 100644
--- a/tests/dialects/test_clickhouse.py
+++ b/tests/dialects/test_clickhouse.py
@@ -8,6 +8,8 @@ class TestClickhouse(Validator):
self.validate_identity("dictGet(x, 'y')")
self.validate_identity("SELECT * FROM x FINAL")
self.validate_identity("SELECT * FROM x AS y FINAL")
+ self.validate_identity("'a' IN mapKeys(map('a', 1, 'b', 2))")
+ self.validate_identity("CAST((1, 2) AS Tuple(a Int8, b Int16))")
self.validate_all(
"SELECT fname, lname, age FROM person ORDER BY age DESC NULLS FIRST, fname ASC NULLS LAST, lname",
@@ -20,6 +22,12 @@ class TestClickhouse(Validator):
self.validate_all(
"CAST(1 AS NULLABLE(Int64))",
write={
- "clickhouse": "CAST(1 AS Nullable(BIGINT))",
+ "clickhouse": "CAST(1 AS Nullable(Int64))",
+ },
+ )
+ self.validate_all(
+ "CAST(1 AS Nullable(DateTime64(6, 'UTC')))",
+ write={
+ "clickhouse": "CAST(1 AS Nullable(DateTime64(6, 'UTC')))",
},
)