1
0
Fork 0

Merging upstream version 15.2.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:58:40 +01:00
parent 2e6df1bcfa
commit 3d4adf9c16
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
81 changed files with 40321 additions and 37940 deletions

View file

@ -10,6 +10,16 @@ class TestRedshift(Validator):
self.validate_identity("foo$")
self.validate_identity("$foo")
self.validate_all(
"SELECT STRTOL('abc', 16)",
read={
"trino": "SELECT FROM_BASE('abc', 16)",
},
write={
"redshift": "SELECT STRTOL('abc', 16)",
"trino": "SELECT FROM_BASE('abc', 16)",
},
)
self.validate_all(
"SELECT SNAPSHOT, type",
write={
@ -18,6 +28,35 @@ class TestRedshift(Validator):
},
)
self.validate_all(
"x is true",
write={
"redshift": "x IS TRUE",
"presto": "x",
},
)
self.validate_all(
"x is false",
write={
"redshift": "x IS FALSE",
"presto": "NOT x",
},
)
self.validate_all(
"x is not false",
write={
"redshift": "NOT x IS FALSE",
"presto": "NOT NOT x",
},
)
self.validate_all(
"LEN(x)",
write={
"redshift": "LENGTH(x)",
"presto": "LENGTH(x)",
},
)
self.validate_all(
"SELECT SYSDATE",
write={
@ -141,7 +180,7 @@ class TestRedshift(Validator):
"DATEDIFF('day', a, b)",
write={
"redshift": "DATEDIFF(day, a, b)",
"presto": "DATE_DIFF('day', a, b)",
"presto": "DATE_DIFF('day', CAST(SUBSTR(CAST(a AS VARCHAR), 1, 10) AS DATE), CAST(SUBSTR(CAST(b AS VARCHAR), 1, 10) AS DATE))",
},
)
self.validate_all(