From be1cb18ea28222fca384a5459a024b7e9af5cadb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 30 Jan 2023 18:08:37 +0100 Subject: Merging upstream version 10.5.10. Signed-off-by: Daniel Baumann --- tests/dialects/test_clickhouse.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/dialects/test_clickhouse.py') diff --git a/tests/dialects/test_clickhouse.py b/tests/dialects/test_clickhouse.py index 2827dd4..905e1f4 100644 --- a/tests/dialects/test_clickhouse.py +++ b/tests/dialects/test_clickhouse.py @@ -17,7 +17,8 @@ class TestClickhouse(Validator): 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_identity("position(a, b)") + self.validate_identity("position(haystack, needle)") + self.validate_identity("position(haystack, needle, position)") self.validate_all( "SELECT fname, lname, age FROM person ORDER BY age DESC NULLS FIRST, fname ASC NULLS LAST, lname", @@ -48,6 +49,10 @@ class TestClickhouse(Validator): "clickhouse": "SELECT quantileIf(0.5)(a, TRUE)", }, ) + self.validate_all( + "SELECT position(needle IN haystack)", + write={"clickhouse": "SELECT position(haystack, needle)"}, + ) def test_cte(self): self.validate_identity("WITH 'x' AS foo SELECT foo") -- cgit v1.2.3