summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_clickhouse.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-02-08 05:38:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-02-08 05:38:39 +0000
commitaedf35026379f52d7e2b4c1f957691410a758089 (patch)
tree86540364259b66741173d2333387b78d6f9c31e2 /tests/dialects/test_clickhouse.py
parentAdding upstream version 20.11.0. (diff)
downloadsqlglot-aedf35026379f52d7e2b4c1f957691410a758089.tar.xz
sqlglot-aedf35026379f52d7e2b4c1f957691410a758089.zip
Adding upstream version 21.0.1.upstream/21.0.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.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/dialects/test_clickhouse.py b/tests/dialects/test_clickhouse.py
index f36af41..d256fc5 100644
--- a/tests/dialects/test_clickhouse.py
+++ b/tests/dialects/test_clickhouse.py
@@ -74,6 +74,10 @@ class TestClickhouse(Validator):
self.validate_identity("CAST(x AS DATETIME)")
self.validate_identity("CAST(x as MEDIUMINT)", "CAST(x AS Int32)")
self.validate_identity("SELECT arrayJoin([1, 2, 3] AS src) AS dst, 'Hello', src")
+ self.validate_identity("""SELECT JSONExtractString('{"x": {"y": 1}}', 'x', 'y')""")
+ self.validate_identity(
+ """SELECT JSONExtractString('{"a": "hello", "b": [-100, 200.0, 300]}', 'a')"""
+ )
self.validate_identity(
"ATTACH DATABASE DEFAULT ENGINE = ORDINARY", check_command_warning=True
)