summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index 76ab94b..691beb9 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -1333,6 +1333,15 @@ class TestDialect(Validator):
def test_set_operators(self):
self.validate_all(
+ "SELECT * FROM a UNION SELECT * FROM b ORDER BY x LIMIT 1",
+ write={
+ "": "SELECT * FROM a UNION SELECT * FROM b ORDER BY x LIMIT 1",
+ "clickhouse": "SELECT * FROM (SELECT * FROM a UNION DISTINCT SELECT * FROM b) AS _l_0 ORDER BY x NULLS FIRST LIMIT 1",
+ "tsql": "SELECT TOP 1 * FROM (SELECT * FROM a UNION SELECT * FROM b) AS _l_0 ORDER BY x",
+ },
+ )
+
+ self.validate_all(
"SELECT * FROM a UNION SELECT * FROM b",
read={
"bigquery": "SELECT * FROM a UNION DISTINCT SELECT * FROM b",
@@ -1667,7 +1676,7 @@ class TestDialect(Validator):
"presto": "CAST(a AS DOUBLE) / b",
"redshift": "CAST(a AS DOUBLE PRECISION) / b",
"sqlite": "CAST(a AS REAL) / b",
- "teradata": "CAST(a AS DOUBLE) / b",
+ "teradata": "CAST(a AS DOUBLE PRECISION) / b",
"trino": "CAST(a AS DOUBLE) / b",
"tsql": "CAST(a AS FLOAT) / b",
},