diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-24 08:03:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-24 08:03:48 +0000 |
commit | 36db14f4c6c28209371d563d76697df0172e337f (patch) | |
tree | 527347be54a38fc9b14fe1fa04c27a4bbae44016 /tests/dialects/test_presto.py | |
parent | Releasing debian version 17.4.1-1. (diff) | |
download | sqlglot-36db14f4c6c28209371d563d76697df0172e337f.tar.xz sqlglot-36db14f4c6c28209371d563d76697df0172e337f.zip |
Merging upstream version 17.7.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_presto.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/dialects/test_presto.py b/tests/dialects/test_presto.py index ddfa9e8..c0b77a3 100644 --- a/tests/dialects/test_presto.py +++ b/tests/dialects/test_presto.py @@ -9,6 +9,14 @@ class TestPresto(Validator): def test_cast(self): self.validate_all( + "SELECT CAST('10C' AS INTEGER)", + read={ + "postgres": "SELECT CAST('10C' AS INTEGER)", + "presto": "SELECT CAST('10C' AS INTEGER)", + "redshift": "SELECT CAST('10C' AS INTEGER)", + }, + ) + self.validate_all( "SELECT DATE_DIFF('week', CAST(CAST('2009-01-01' AS TIMESTAMP) AS DATE), CAST(CAST('2009-12-31' AS TIMESTAMP) AS DATE))", read={"redshift": "SELECT DATEDIFF(week, '2009-01-01', '2009-12-31')"}, ) @@ -17,7 +25,7 @@ class TestPresto(Validator): read={"redshift": "SELECT DATEADD(month, 18, '2008-02-28')"}, ) self.validate_all( - "SELECT TRY_CAST('1970-01-01 00:00:00' AS TIMESTAMP)", + "SELECT CAST('1970-01-01 00:00:00' AS TIMESTAMP)", read={"postgres": "SELECT 'epoch'::TIMESTAMP"}, ) self.validate_all( |