summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_redshift.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-19 10:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-19 10:22:09 +0000
commit66af5c6fc22f6f11e9ea807b274e011a6f64efb7 (patch)
tree08ceed3b311b7b343935c1e55941b9d15e6f56d8 /tests/dialects/test_redshift.py
parentReleasing debian version 11.3.6-1. (diff)
downloadsqlglot-66af5c6fc22f6f11e9ea807b274e011a6f64efb7.tar.xz
sqlglot-66af5c6fc22f6f11e9ea807b274e011a6f64efb7.zip
Merging upstream version 11.4.1.
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.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/dialects/test_redshift.py b/tests/dialects/test_redshift.py
index f5b8a43..ff730f8 100644
--- a/tests/dialects/test_redshift.py
+++ b/tests/dialects/test_redshift.py
@@ -7,6 +7,9 @@ class TestRedshift(Validator):
def test_redshift(self):
self.validate_all("CONVERT(INTEGER, x)", write={"redshift": "CAST(x AS INTEGER)"})
self.validate_all(
+ "DATEADD('day', ndays, caldate)", write={"redshift": "DATEADD(day, ndays, caldate)"}
+ )
+ self.validate_all(
'create table "group" ("col" char(10))',
write={
"redshift": 'CREATE TABLE "group" ("col" CHAR(10))',
@@ -80,10 +83,10 @@ class TestRedshift(Validator):
},
)
self.validate_all(
- "DATEDIFF(d, a, b)",
+ "DATEDIFF('day', a, b)",
write={
- "redshift": "DATEDIFF(d, a, b)",
- "presto": "DATE_DIFF(d, a, b)",
+ "redshift": "DATEDIFF(day, a, b)",
+ "presto": "DATE_DIFF('day', a, b)",
},
)
self.validate_all(