diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-14 10:12:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-14 10:12:13 +0000 |
commit | cdffd0b29d5b072639bb02118d6828f4d1b76099 (patch) | |
tree | 57ec0b75c40e40a33060b63599bbba6f0af27ae8 /tests/dialects/test_redshift.py | |
parent | Adding upstream version 17.11.0. (diff) | |
download | sqlglot-cdffd0b29d5b072639bb02118d6828f4d1b76099.tar.xz sqlglot-cdffd0b29d5b072639bb02118d6828f4d1b76099.zip |
Adding upstream version 17.12.0.upstream/17.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_redshift.py')
-rw-r--r-- | tests/dialects/test_redshift.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/dialects/test_redshift.py b/tests/dialects/test_redshift.py index 96e9e20..3af27d4 100644 --- a/tests/dialects/test_redshift.py +++ b/tests/dialects/test_redshift.py @@ -6,6 +6,26 @@ class TestRedshift(Validator): def test_redshift(self): self.validate_all( + "SELECT CAST('01:03:05.124' AS TIME(2) WITH TIME ZONE)", + read={ + "postgres": "SELECT CAST('01:03:05.124' AS TIMETZ(2))", + }, + write={ + "postgres": "SELECT CAST('01:03:05.124' AS TIMETZ(2))", + "redshift": "SELECT CAST('01:03:05.124' AS TIME(2) WITH TIME ZONE)", + }, + ) + self.validate_all( + "SELECT CAST('2020-02-02 01:03:05.124' AS TIMESTAMP(2) WITH TIME ZONE)", + read={ + "postgres": "SELECT CAST('2020-02-02 01:03:05.124' AS TIMESTAMPTZ(2))", + }, + write={ + "postgres": "SELECT CAST('2020-02-02 01:03:05.124' AS TIMESTAMPTZ(2))", + "redshift": "SELECT CAST('2020-02-02 01:03:05.124' AS TIMESTAMP(2) WITH TIME ZONE)", + }, + ) + self.validate_all( "SELECT INTERVAL '5 days'", read={ "": "SELECT INTERVAL '5' days", |