1
0
Fork 0

Adding upstream version 11.3.6.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:44:19 +01:00
parent 2f30828945
commit d160fb48f7
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
46 changed files with 23416 additions and 22639 deletions

View file

@ -89,6 +89,20 @@ class TestSQLite(Validator):
write={"snowflake": "LEAST(x, y, z)"},
)
def test_datediff(self):
self.validate_all(
"DATEDIFF(a, b, 'day')",
write={"sqlite": "CAST((JULIANDAY(a) - JULIANDAY(b)) AS INTEGER)"},
)
self.validate_all(
"DATEDIFF(a, b, 'hour')",
write={"sqlite": "CAST((JULIANDAY(a) - JULIANDAY(b)) * 24.0 AS INTEGER)"},
)
self.validate_all(
"DATEDIFF(a, b, 'year')",
write={"sqlite": "CAST((JULIANDAY(a) - JULIANDAY(b)) / 365.0 AS INTEGER)"},
)
def test_hexadecimal_literal(self):
self.validate_all(
"SELECT 0XCC",