summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_teradata.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_teradata.py')
-rw-r--r--tests/dialects/test_teradata.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/dialects/test_teradata.py b/tests/dialects/test_teradata.py
index 5d4f7db..dcb513d 100644
--- a/tests/dialects/test_teradata.py
+++ b/tests/dialects/test_teradata.py
@@ -39,6 +39,31 @@ class TestTeradata(Validator):
write={"teradata": "CREATE OR REPLACE VIEW a AS (SELECT b FROM c)"},
)
+ self.validate_all(
+ "CREATE VOLATILE TABLE a",
+ write={
+ "teradata": "CREATE VOLATILE TABLE a",
+ "bigquery": "CREATE TABLE a",
+ "clickhouse": "CREATE TABLE a",
+ "databricks": "CREATE TABLE a",
+ "drill": "CREATE TABLE a",
+ "duckdb": "CREATE TABLE a",
+ "hive": "CREATE TABLE a",
+ "mysql": "CREATE TABLE a",
+ "oracle": "CREATE TABLE a",
+ "postgres": "CREATE TABLE a",
+ "presto": "CREATE TABLE a",
+ "redshift": "CREATE TABLE a",
+ "snowflake": "CREATE TABLE a",
+ "spark": "CREATE TABLE a",
+ "sqlite": "CREATE TABLE a",
+ "starrocks": "CREATE TABLE a",
+ "tableau": "CREATE TABLE a",
+ "trino": "CREATE TABLE a",
+ "tsql": "CREATE TABLE a",
+ },
+ )
+
def test_insert(self):
self.validate_all(
"INS INTO x SELECT * FROM y", write={"teradata": "INSERT INTO x SELECT * FROM y"}
@@ -71,3 +96,15 @@ class TestTeradata(Validator):
)
self.validate_identity("CREATE TABLE z (a SYSUDTLIB.INT)")
+
+ def test_cast(self):
+ self.validate_all(
+ "CAST('1992-01' AS DATE FORMAT 'YYYY-DD')",
+ write={
+ "teradata": "CAST('1992-01' AS DATE FORMAT 'YYYY-DD')",
+ "databricks": "DATE_FORMAT('1992-01', 'YYYY-DD')",
+ "mysql": "DATE_FORMAT('1992-01', 'YYYY-DD')",
+ "spark": "DATE_FORMAT('1992-01', 'YYYY-DD')",
+ "": "TIME_TO_STR('1992-01', 'YYYY-DD')",
+ },
+ )