1
0
Fork 0

Adding upstream version 16.2.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 16:00:14 +01:00
parent 577b79f5a7
commit d61627452f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
106 changed files with 41940 additions and 40162 deletions

View file

@ -1084,6 +1084,14 @@ class TestDialect(Validator):
self.validate_identity("some.column LIKE 'foo' + another.column + 'bar'")
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={
@ -1177,10 +1185,21 @@ 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={
@ -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",