diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:02:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:02:12 +0000 |
commit | 07115fb6b7dc48595d30c3d1568fbeff0388d096 (patch) | |
tree | f8017ffa5da7c1a44443bbf5fc6c3937b243ac5e /tests/dialects/test_databricks.py | |
parent | Adding upstream version 23.7.0. (diff) | |
download | sqlglot-07115fb6b7dc48595d30c3d1568fbeff0388d096.tar.xz sqlglot-07115fb6b7dc48595d30c3d1568fbeff0388d096.zip |
Adding upstream version 23.10.0.upstream/23.10.0
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.py | 5 |
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( |