Skip to content

Commit e60634f

Browse files
authored
feat(clickhouse): Add support for quantilesExactExclusive agg func (#6535)
1 parent ee5e7b9 commit e60634f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sqlglot/dialects/clickhouse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ class Parser(parser.Parser):
471471
"quantiles",
472472
"quantileExact",
473473
"quantilesExact",
474+
"quantilesExactExclusive",
474475
"quantileExactLow",
475476
"quantilesExactLow",
476477
"quantileExactHigh",

tests/dialects/test_clickhouse.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ def test_clickhouse(self):
672672
self.validate_identity("currentDatabase()", "CURRENT_DATABASE()")
673673
self.validate_identity("currentSchemas(TRUE)", "CURRENT_SCHEMAS(TRUE)")
674674

675+
self.validate_identity(
676+
"SELECT quantilesExactExclusive(0.25, 0.5, 0.75)(x) AS y FROM (SELECT number AS x FROM num)"
677+
)
678+
675679
def test_clickhouse_values(self):
676680
ast = self.parse_one("SELECT * FROM VALUES (1, 2, 3)")
677681
self.assertEqual(len(list(ast.find_all(exp.Tuple))), 4)

0 commit comments

Comments
 (0)