summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index 7e20812..8ffdf07 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -1085,6 +1085,14 @@ class TestDialect(Validator):
self.validate_all("LIKE(x, 'z')", write={"": "'z' LIKE x"})
self.validate_all(
+ "CONCAT(a, b, c)",
+ write={
+ "": "CONCAT(a, b, c)",
+ "redshift": "a || b || c",
+ "sqlite": "a || b || c",
+ },
+ )
+ self.validate_all(
"x ILIKE '%y'",
read={
"clickhouse": "x ILIKE '%y'",
@@ -1177,11 +1185,22 @@ class TestDialect(Validator):
self.validate_all(
"CONCAT(a)",
write={
- "mysql": "a",
+ "clickhouse": "a",
+ "presto": "a",
+ "trino": "a",
"tsql": "a",
},
)
self.validate_all(
+ "COALESCE(a, '')",
+ read={
+ "drill": "CONCAT(a)",
+ "duckdb": "CONCAT(a)",
+ "postgres": "CONCAT(a)",
+ "tsql": "CONCAT(a)",
+ },
+ )
+ self.validate_all(
"IF(x > 1, 1, 0)",
write={
"drill": "`IF`(x > 1, 1, 0)",
@@ -1276,7 +1295,7 @@ class TestDialect(Validator):
def test_limit(self):
self.validate_all(
"SELECT * FROM data LIMIT 10, 20",
- write={"sqlite": "SELECT * FROM data LIMIT 10 OFFSET 20"},
+ write={"sqlite": "SELECT * FROM data LIMIT 20 OFFSET 10"},
)
self.validate_all(
"SELECT x FROM y LIMIT 10",