summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_clickhouse.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-14 10:12:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-14 10:12:19 +0000
commit3742f86d166160ca3843872ebecb6f30c51f6085 (patch)
tree6d747c3e7082fc2bae56053930813d5625e9b3d8 /tests/dialects/test_clickhouse.py
parentReleasing debian version 17.11.0-1. (diff)
downloadsqlglot-3742f86d166160ca3843872ebecb6f30c51f6085.tar.xz
sqlglot-3742f86d166160ca3843872ebecb6f30c51f6085.zip
Merging upstream version 17.12.0.
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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/dialects/test_clickhouse.py b/tests/dialects/test_clickhouse.py
index 16c10fe..583be3e 100644
--- a/tests/dialects/test_clickhouse.py
+++ b/tests/dialects/test_clickhouse.py
@@ -10,6 +10,13 @@ class TestClickhouse(Validator):
self.assertEqual(expr.sql(dialect="clickhouse"), "COUNT(x)")
self.assertIsNone(expr._meta)
+ self.validate_identity("CAST(x AS Nested(ID UInt32, Serial UInt32, EventTime DATETIME))")
+ self.validate_identity("CAST(x AS Enum('hello' = 1, 'world' = 2))")
+ self.validate_identity("CAST(x AS Enum('hello', 'world'))")
+ self.validate_identity("CAST(x AS Enum('hello' = 1, 'world'))")
+ self.validate_identity("CAST(x AS Enum8('hello' = -123, 'world'))")
+ self.validate_identity("CAST(x AS FixedString(1))")
+ self.validate_identity("CAST(x AS LowCardinality(FixedString))")
self.validate_identity("SELECT isNaN(1.0)")
self.validate_identity("SELECT startsWith('Spider-Man', 'Spi')")
self.validate_identity("SELECT xor(TRUE, FALSE)")