summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_redshift.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 13:45:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 13:45:09 +0000
commit639a208fa57ea674d165c4837e96f3ae4d7e3e61 (patch)
treef4d66da146c396d407cecefb5b405e609af1109e /tests/dialects/test_redshift.py
parentReleasing debian version 11.0.1-1. (diff)
downloadsqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.tar.xz
sqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.zip
Merging upstream version 11.1.3.
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, 8 insertions, 1 deletions
diff --git a/tests/dialects/test_redshift.py b/tests/dialects/test_redshift.py
index e20661e..fa4d422 100644
--- a/tests/dialects/test_redshift.py
+++ b/tests/dialects/test_redshift.py
@@ -47,7 +47,7 @@ class TestRedshift(Validator):
self.validate_all(
'SELECT tablename, "column" FROM pg_table_def WHERE "column" LIKE \'%start\\_%\' LIMIT 5',
write={
- "redshift": 'SELECT tablename, "column" FROM pg_table_def WHERE "column" LIKE \'%start\\\\_%\' LIMIT 5'
+ "redshift": 'SELECT tablename, "column" FROM pg_table_def WHERE "column" LIKE \'%start\\_%\' LIMIT 5'
},
)
self.validate_all(
@@ -72,6 +72,13 @@ class TestRedshift(Validator):
"postgres": "COALESCE(a, b, c, d)",
},
)
+ self.validate_all(
+ "DATEDIFF(d, a, b)",
+ write={
+ "redshift": "DATEDIFF(d, a, b)",
+ "presto": "DATE_DIFF(d, a, b)",
+ },
+ )
def test_identity(self):
self.validate_identity(