diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 09:41:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 09:41:18 +0000 |
commit | 67578a7602a5be7eb51f324086c8d49bcf8b7498 (patch) | |
tree | 0b7515c922d1c383cea24af5175379cfc8edfd15 /tests/dialects/test_dialect.py | |
parent | Releasing debian version 15.2.0-1. (diff) | |
download | sqlglot-67578a7602a5be7eb51f324086c8d49bcf8b7498.tar.xz sqlglot-67578a7602a5be7eb51f324086c8d49bcf8b7498.zip |
Merging upstream version 16.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_dialect.py | 23 |
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", |