summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-25 16:01:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-25 16:01:43 +0000
commit29f9a15cce138301cd5a84a1fd4060494a3a65b6 (patch)
treec593be2f0b0fdc60a43983aa547b34a441170e59 /tests/dialects/test_dialect.py
parentAdding upstream version 9.0.1. (diff)
downloadsqlglot-29f9a15cce138301cd5a84a1fd4060494a3a65b6.tar.xz
sqlglot-29f9a15cce138301cd5a84a1fd4060494a3a65b6.zip
Adding upstream version 9.0.3.upstream/9.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index e1524e9..5d1cf13 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -434,12 +434,7 @@ class TestDialect(Validator):
"presto": "DATE_ADD('day', 1, x)",
"spark": "DATE_ADD(x, 1)",
"starrocks": "DATE_ADD(x, INTERVAL 1 DAY)",
- },
- )
- self.validate_all(
- "DATE_ADD(x, y, 'day')",
- write={
- "postgres": UnsupportedError,
+ "tsql": "DATEADD(day, 1, x)",
},
)
self.validate_all(
@@ -634,11 +629,13 @@ class TestDialect(Validator):
read={
"postgres": "x->'y'",
"presto": "JSON_EXTRACT(x, 'y')",
+ "starrocks": "x->'y'",
},
write={
"oracle": "JSON_EXTRACT(x, 'y')",
"postgres": "x->'y'",
"presto": "JSON_EXTRACT(x, 'y')",
+ "starrocks": "x->'y'",
},
)
self.validate_all(
@@ -983,6 +980,7 @@ class TestDialect(Validator):
)
def test_limit(self):
+ self.validate_all("SELECT * FROM data LIMIT 10, 20", write={"sqlite": "SELECT * FROM data LIMIT 10 OFFSET 20"})
self.validate_all(
"SELECT x FROM y LIMIT 10",
write={