summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_redshift.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:39 +0000
commitf10d022e11dcd1015db1a74ce9f4198ebdcb7f40 (patch)
treeac7bdc1d214a0f97f991cff14e933f4895ee68e1 /tests/dialects/test_redshift.py
parentReleasing progress-linux version 18.11.6-1. (diff)
downloadsqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.tar.xz
sqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.zip
Merging upstream version 18.13.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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dialects/test_redshift.py b/tests/dialects/test_redshift.py
index 9f2761f..f182feb 100644
--- a/tests/dialects/test_redshift.py
+++ b/tests/dialects/test_redshift.py
@@ -6,6 +6,18 @@ class TestRedshift(Validator):
dialect = "redshift"
def test_redshift(self):
+ self.validate_all(
+ "SELECT APPROXIMATE COUNT(DISTINCT y)",
+ read={
+ "spark": "SELECT APPROX_COUNT_DISTINCT(y)",
+ },
+ write={
+ "redshift": "SELECT APPROXIMATE COUNT(DISTINCT y)",
+ "spark": "SELECT APPROX_COUNT_DISTINCT(y)",
+ },
+ )
+ self.validate_identity("SELECT APPROXIMATE AS y")
+
self.validate_identity(
"SELECT 'a''b'",
"SELECT 'a\\'b'",