diff options
Diffstat (limited to 'tests/dialects/test_presto.py')
-rw-r--r-- | tests/dialects/test_presto.py | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/tests/dialects/test_presto.py b/tests/dialects/test_presto.py index a2800bd..ec1ad30 100644 --- a/tests/dialects/test_presto.py +++ b/tests/dialects/test_presto.py @@ -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, }, ) |