diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-03 14:11:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-03 14:11:03 +0000 |
commit | 5d0ea770947ae1da51537ff75b14b48218d729aa (patch) | |
tree | 86e66fc69feeae4c4b23749e7779f6731791edcc /tests/dialects/test_presto.py | |
parent | Adding upstream version 21.1.2. (diff) | |
download | sqlglot-5d0ea770947ae1da51537ff75b14b48218d729aa.tar.xz sqlglot-5d0ea770947ae1da51537ff75b14b48218d729aa.zip |
Adding upstream version 22.2.0.upstream/22.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_presto.py')
-rw-r--r-- | tests/dialects/test_presto.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/dialects/test_presto.py b/tests/dialects/test_presto.py index d3d1a76..2ea595e 100644 --- a/tests/dialects/test_presto.py +++ b/tests/dialects/test_presto.py @@ -647,6 +647,7 @@ class TestPresto(Validator): """JSON '"foo"'""", write={ "bigquery": """PARSE_JSON('"foo"')""", + "postgres": """CAST('"foo"' AS JSON)""", "presto": """JSON_PARSE('"foo"')""", "snowflake": """PARSE_JSON('"foo"')""", }, @@ -1142,3 +1143,18 @@ MATCH_RECOGNIZE ( "presto": "DATE_FORMAT(ts, '%y')", }, ) + + def test_signum(self): + self.validate_all( + "SIGN(x)", + read={ + "presto": "SIGN(x)", + "spark": "SIGNUM(x)", + "starrocks": "SIGN(x)", + }, + write={ + "presto": "SIGN(x)", + "spark": "SIGN(x)", + "starrocks": "SIGN(x)", + }, + ) |