summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_databricks.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-04 12:14:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-04 12:14:40 +0000
commitd7f0758e21b5111b5327f3839c5c9f49a04d272b (patch)
treea425f4ebcc159d6bd9443fe4e0e2f9eb20151027 /tests/dialects/test_databricks.py
parentAdding upstream version 18.7.0. (diff)
downloadsqlglot-d7f0758e21b5111b5327f3839c5c9f49a04d272b.tar.xz
sqlglot-d7f0758e21b5111b5327f3839c5c9f49a04d272b.zip
Adding upstream version 18.11.2.upstream/18.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_databricks.py')
-rw-r--r--tests/dialects/test_databricks.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py
index 3df968b..7c03c83 100644
--- a/tests/dialects/test_databricks.py
+++ b/tests/dialects/test_databricks.py
@@ -32,6 +32,13 @@ class TestDatabricks(Validator):
"CREATE TABLE foo (x INT GENERATED ALWAYS AS (YEAR(y)))",
write={
"databricks": "CREATE TABLE foo (x INT GENERATED ALWAYS AS (YEAR(TO_DATE(y))))",
+ "tsql": "CREATE TABLE foo (x AS YEAR(CAST(y AS DATE)))",
+ },
+ )
+ self.validate_all(
+ "CREATE TABLE t1 AS (SELECT c FROM t2)",
+ read={
+ "teradata": "CREATE TABLE t1 AS (SELECT c FROM t2) WITH DATA",
},
)