diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 16:12:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 16:12:58 +0000 |
commit | 042432fc9a1f7c3d5d552f12449fe45109fbcd57 (patch) | |
tree | 227afb41878f15dba7350b90ec6cfd52a02aabd6 /tests/dialects/test_databricks.py | |
parent | Adding upstream version 23.12.1. (diff) | |
download | sqlglot-042432fc9a1f7c3d5d552f12449fe45109fbcd57.tar.xz sqlglot-042432fc9a1f7c3d5d552f12449fe45109fbcd57.zip |
Adding upstream version 23.13.1.upstream/23.13.1
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py index c15cf09..14a6bf3 100644 --- a/tests/dialects/test_databricks.py +++ b/tests/dialects/test_databricks.py @@ -26,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( + "CREATE TABLE IF NOT EXISTS db.table (a TIMESTAMP, b BOOLEAN GENERATED ALWAYS AS (NOT a IS NULL)) USING DELTA" + ) + 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( @@ -47,6 +50,9 @@ class TestDatabricks(Validator): self.validate_identity( "TRUNCATE TABLE t1 PARTITION(age = 10, name = 'test', city LIKE 'LA')" ) + self.validate_identity( + "COPY INTO target FROM `s3://link` FILEFORMAT = AVRO VALIDATE = ALL FILES = ('file1', 'file2') FORMAT_OPTIONS(opt1 = TRUE, opt2 = 'test') COPY_OPTIONS(opt3 = 5)" + ) self.validate_all( "CREATE TABLE foo (x INT GENERATED ALWAYS AS (YEAR(y)))", |