diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-24 08:03:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-24 08:03:45 +0000 |
commit | ca57dc468e5d8d0920e964d45ad25271ae6e633d (patch) | |
tree | 319d8bffcb5c3e9afe9e62beca9ef401480578d2 /tests/dialects/test_postgres.py | |
parent | Adding upstream version 17.4.1. (diff) | |
download | sqlglot-ca57dc468e5d8d0920e964d45ad25271ae6e633d.tar.xz sqlglot-ca57dc468e5d8d0920e964d45ad25271ae6e633d.zip |
Adding upstream version 17.7.0.upstream/17.7.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_postgres.py')
-rw-r--r-- | tests/dialects/test_postgres.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/dialects/test_postgres.py b/tests/dialects/test_postgres.py index 9fc18b7..b35665b 100644 --- a/tests/dialects/test_postgres.py +++ b/tests/dialects/test_postgres.py @@ -255,8 +255,8 @@ class TestPostgres(Validator): "GENERATE_SERIES('2019-01-01'::TIMESTAMP, NOW(), '1day')", write={ "postgres": "GENERATE_SERIES(CAST('2019-01-01' AS TIMESTAMP), CURRENT_TIMESTAMP, INTERVAL '1 day')", - "presto": "SEQUENCE(TRY_CAST('2019-01-01' AS TIMESTAMP), CAST(CURRENT_TIMESTAMP AS TIMESTAMP), INTERVAL '1' day)", - "trino": "SEQUENCE(TRY_CAST('2019-01-01' AS TIMESTAMP), CAST(CURRENT_TIMESTAMP AS TIMESTAMP), INTERVAL '1' day)", + "presto": "SEQUENCE(CAST('2019-01-01' AS TIMESTAMP), CAST(CURRENT_TIMESTAMP AS TIMESTAMP), INTERVAL '1' day)", + "trino": "SEQUENCE(CAST('2019-01-01' AS TIMESTAMP), CAST(CURRENT_TIMESTAMP AS TIMESTAMP), INTERVAL '1' day)", }, ) self.validate_all( @@ -470,7 +470,7 @@ class TestPostgres(Validator): """SELECT JSON_ARRAY_ELEMENTS((foo->'sections')::JSON) AS sections""", write={ "postgres": """SELECT JSON_ARRAY_ELEMENTS(CAST((foo -> 'sections') AS JSON)) AS sections""", - "presto": """SELECT JSON_ARRAY_ELEMENTS(TRY_CAST((JSON_EXTRACT(foo, 'sections')) AS JSON)) AS sections""", + "presto": """SELECT JSON_ARRAY_ELEMENTS(CAST((JSON_EXTRACT(foo, 'sections')) AS JSON)) AS sections""", }, ) self.validate_all( @@ -570,7 +570,7 @@ class TestPostgres(Validator): }, ) - self.assertIsInstance(parse_one("id::UUID", read="postgres"), exp.TryCast) + self.assertIsInstance(parse_one("id::UUID", read="postgres"), exp.Cast) def test_bool_or(self): self.validate_all( |