summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_teradata.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-07 18:09:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-07 18:09:27 +0000
commite4c72fd7c8018d9dfc6043e7304275e2fffac89f (patch)
treefb9c5556844d46d0e59cc31f129d03502f06f571 /tests/dialects/test_teradata.py
parentAdding upstream version 11.2.3. (diff)
downloadsqlglot-e4c72fd7c8018d9dfc6043e7304275e2fffac89f.tar.xz
sqlglot-e4c72fd7c8018d9dfc6043e7304275e2fffac89f.zip
Adding upstream version 11.3.0.upstream/11.3.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_teradata.py')
-rw-r--r--tests/dialects/test_teradata.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/dialects/test_teradata.py b/tests/dialects/test_teradata.py
index dd251ab..5d4f7db 100644
--- a/tests/dialects/test_teradata.py
+++ b/tests/dialects/test_teradata.py
@@ -24,19 +24,21 @@ class TestTeradata(Validator):
def test_create(self):
self.validate_identity("CREATE TABLE x (y INT) PRIMARY INDEX (y) PARTITION BY y INDEX (y)")
+ self.validate_identity(
+ "CREATE TABLE a (b INT) PRIMARY INDEX (y) PARTITION BY RANGE_N(b BETWEEN 'a', 'b' AND 'c' EACH '1')"
+ )
+ self.validate_identity(
+ "CREATE TABLE a (b INT) PARTITION BY RANGE_N(b BETWEEN 0, 1 AND 2 EACH 1)"
+ )
+ self.validate_identity(
+ "CREATE TABLE a (b INT) PARTITION BY RANGE_N(b BETWEEN *, 1 AND * EACH b) INDEX (a)"
+ )
self.validate_all(
"REPLACE VIEW a AS (SELECT b FROM c)",
write={"teradata": "CREATE OR REPLACE VIEW a AS (SELECT b FROM c)"},
)
- self.validate_all(
- "SEL a FROM b",
- write={"teradata": "SELECT a FROM b"},
- )
-
- self.validate_identity("CREATE VOLATILE TABLE a (b INT)")
-
def test_insert(self):
self.validate_all(
"INS INTO x SELECT * FROM y", write={"teradata": "INSERT INTO x SELECT * FROM y"}
@@ -54,6 +56,11 @@ class TestTeradata(Validator):
self.validate_all("a NE b", write={"teradata": "a <> b"})
self.validate_all("a NOT= b", write={"teradata": "a <> b"})
+ self.validate_all(
+ "SEL a FROM b",
+ write={"teradata": "SELECT a FROM b"},
+ )
+
def test_datatype(self):
self.validate_all(
"CREATE TABLE z (a ST_GEOMETRY(1))",