diff options
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_clickhouse.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/dialects/test_clickhouse.py b/tests/dialects/test_clickhouse.py index 3bff6e2..a4ee23c 100644 --- a/tests/dialects/test_clickhouse.py +++ b/tests/dialects/test_clickhouse.py @@ -85,8 +85,8 @@ class TestClickhouse(Validator): self.validate_identity("SELECT exponentialTimeDecayedAvg(60)(a, b)") self.validate_identity("levenshteinDistance(col1, col2)", "editDistance(col1, col2)") self.validate_identity("SELECT * FROM foo WHERE x GLOBAL IN (SELECT * FROM bar)") - self.validate_identity("position(haystack, needle)") - self.validate_identity("position(haystack, needle, position)") + self.validate_identity("POSITION(haystack, needle)") + self.validate_identity("POSITION(haystack, needle, position)") self.validate_identity("CAST(x AS DATETIME)", "CAST(x AS DateTime)") self.validate_identity("CAST(x AS TIMESTAMPTZ)", "CAST(x AS DateTime)") self.validate_identity("CAST(x as MEDIUMINT)", "CAST(x AS Int32)") @@ -398,9 +398,8 @@ class TestClickhouse(Validator): "clickhouse": "SELECT quantileIf(0.5)(a, TRUE)", }, ) - self.validate_all( - "SELECT position(needle IN haystack)", - write={"clickhouse": "SELECT position(haystack, needle)"}, + self.validate_identity( + "SELECT POSITION(needle IN haystack)", "SELECT POSITION(haystack, needle)" ) self.validate_identity( "SELECT * FROM x LIMIT 10 SETTINGS max_results = 100, result = 'break'" @@ -742,6 +741,9 @@ class TestClickhouse(Validator): "CREATE TABLE a ENGINE=Memory AS SELECT 1 AS c COMMENT 'foo'", "CREATE TABLE a ENGINE=Memory AS (SELECT 1 AS c) COMMENT 'foo'", ) + self.validate_identity( + 'CREATE TABLE t1 ("x" UInt32, "y" Dynamic, "z" Dynamic(max_types = 10)) ENGINE=MergeTree ORDER BY x' + ) self.validate_all( "CREATE DATABASE x", |