summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_databricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_databricks.py')
-rw-r--r--tests/dialects/test_databricks.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py
index 94f2dc2..c15cf09 100644
--- a/tests/dialects/test_databricks.py
+++ b/tests/dialects/test_databricks.py
@@ -7,6 +7,8 @@ class TestDatabricks(Validator):
dialect = "databricks"
def test_databricks(self):
+ self.validate_identity("DESCRIBE HISTORY a.b")
+ self.validate_identity("DESCRIBE history.tbl")
self.validate_identity("CREATE TABLE t (c STRUCT<interval: DOUBLE COMMENT 'aaa'>)")
self.validate_identity("CREATE TABLE my_table TBLPROPERTIES (a.b=15)")
self.validate_identity("CREATE TABLE my_table TBLPROPERTIES ('a.b'=15)")
@@ -24,6 +26,9 @@ class TestDatabricks(Validator):
self.validate_identity("SELECT ${x} FROM ${y} WHERE ${z} > 1")
self.validate_identity("CREATE TABLE foo (x DATE GENERATED ALWAYS AS (CAST(y AS DATE)))")
self.validate_identity(
+ "SELECT DATE_FORMAT(CAST(FROM_UTC_TIMESTAMP(CAST(foo AS TIMESTAMP), 'America/Los_Angeles') AS TIMESTAMP), 'yyyy-MM-dd HH:mm:ss') AS foo FROM t"
+ )
+ self.validate_identity(
"SELECT * FROM sales UNPIVOT INCLUDE NULLS (sales FOR quarter IN (q1 AS `Jan-Mar`))"
)
self.validate_identity(