diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-17 10:32:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-17 10:32:12 +0000 |
commit | 244a05de60c9417daab9528b51788c3d2a00dc5f (patch) | |
tree | 89a9c82aa41d397e1b81c320ad7a287b6c80f313 /tests/dialects/test_clickhouse.py | |
parent | Adding upstream version 10.4.2. (diff) | |
download | sqlglot-244a05de60c9417daab9528b51788c3d2a00dc5f.tar.xz sqlglot-244a05de60c9417daab9528b51788c3d2a00dc5f.zip |
Adding upstream version 10.5.2.upstream/10.5.2
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.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/dialects/test_clickhouse.py b/tests/dialects/test_clickhouse.py index c95c967..109e9f3 100644 --- a/tests/dialects/test_clickhouse.py +++ b/tests/dialects/test_clickhouse.py @@ -14,6 +14,9 @@ class TestClickhouse(Validator): self.validate_identity("SELECT * FROM foo LEFT ASOF JOIN bla") self.validate_identity("SELECT * FROM foo ASOF JOIN bla") self.validate_identity("SELECT * FROM foo ANY JOIN bla") + self.validate_identity("SELECT quantile(0.5)(a)") + self.validate_identity("SELECT quantiles(0.5)(a) AS x FROM t") + self.validate_identity("SELECT * FROM foo WHERE x GLOBAL IN (SELECT * FROM bar)") self.validate_all( "SELECT fname, lname, age FROM person ORDER BY age DESC NULLS FIRST, fname ASC NULLS LAST, lname", @@ -38,3 +41,9 @@ class TestClickhouse(Validator): "SELECT x #! comment", write={"": "SELECT x /* comment */"}, ) + self.validate_all( + "SELECT quantileIf(0.5)(a, true)", + write={ + "clickhouse": "SELECT quantileIf(0.5)(a, TRUE)", + }, + ) |