1
0
Fork 0

Adding upstream version 10.5.6.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:04:17 +01:00
parent b97d49f611
commit 556602e7d9
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
39 changed files with 786 additions and 133 deletions

View file

@ -152,6 +152,10 @@ class TestPresto(Validator):
"spark": "FROM_UNIXTIME(x)",
},
)
self.validate_identity("FROM_UNIXTIME(a, b)")
self.validate_identity("FROM_UNIXTIME(a, b, c)")
self.validate_identity("TRIM(a, b)")
self.validate_identity("VAR_POP(a)")
self.validate_all(
"TO_UNIXTIME(x)",
write={
@ -302,6 +306,7 @@ class TestPresto(Validator):
)
def test_presto(self):
self.validate_identity("SELECT BOOL_OR(a > 10) FROM asd AS T(a)")
self.validate_all(
'SELECT a."b" FROM "foo"',
write={
@ -443,8 +448,10 @@ class TestPresto(Validator):
"spark": UnsupportedError,
},
)
self.validate_identity("SELECT * FROM (VALUES (1))")
self.validate_identity("START TRANSACTION READ WRITE, ISOLATION LEVEL SERIALIZABLE")
self.validate_identity("START TRANSACTION ISOLATION LEVEL REPEATABLE READ")
self.validate_identity("APPROX_PERCENTILE(a, b, c, d)")
def test_encode_decode(self):
self.validate_all(
@ -459,6 +466,12 @@ class TestPresto(Validator):
"spark": "DECODE(x, 'utf-8')",
},
)
self.validate_all(
"FROM_UTF8(x, y)",
write={
"presto": "FROM_UTF8(x, y)",
},
)
self.validate_all(
"ENCODE(x, 'utf-8')",
write={