1
0
Fork 0

Merging upstream version 17.11.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 20:51:40 +01:00
parent 2bd548fc43
commit 14ca349bca
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
69 changed files with 30974 additions and 30030 deletions

View file

@ -466,6 +466,7 @@ class TestPresto(Validator):
read={"spark": "STARTSWITH('abc', 'a')"},
write={
"presto": "STARTS_WITH('abc', 'a')",
"snowflake": "STARTSWITH('abc', 'a')",
"spark": "STARTSWITH('abc', 'a')",
},
)
@ -740,46 +741,44 @@ class TestPresto(Validator):
)
def test_encode_decode(self):
self.validate_identity("FROM_UTF8(x, y)")
self.validate_all(
"TO_UTF8(x)",
read={
"duckdb": "ENCODE(x)",
"spark": "ENCODE(x, 'utf-8')",
},
write={
"duckdb": "ENCODE(x)",
"presto": "TO_UTF8(x)",
"spark": "ENCODE(x, 'utf-8')",
},
)
self.validate_all(
"FROM_UTF8(x)",
write={
read={
"duckdb": "DECODE(x)",
"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={
"presto": "TO_UTF8(x)",
},
)
self.validate_all(
"DECODE(x, 'utf-8')",
write={
"duckdb": "DECODE(x)",
"presto": "FROM_UTF8(x)",
"spark": "DECODE(x, 'utf-8')",
},
)
self.validate_all(
"ENCODE(x, 'invalid')",
write={
"presto": UnsupportedError,
"duckdb": UnsupportedError,
},
)
self.validate_all(
"DECODE(x, 'invalid')",
write={
"presto": UnsupportedError,
"duckdb": UnsupportedError,
},
)