diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-13 11:12:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-13 11:12:05 +0000 |
commit | 6d546bfddf465f629d17ee52f78b477eb632fd91 (patch) | |
tree | 525fd07ca45a5972930252d7f6c9ff5566be9ee7 /tests/dialects/test_spark.py | |
parent | Releasing debian version 25.1.0-1. (diff) | |
download | sqlglot-6d546bfddf465f629d17ee52f78b477eb632fd91.tar.xz sqlglot-6d546bfddf465f629d17ee52f78b477eb632fd91.zip |
Merging upstream version 25.5.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_spark.py')
-rw-r--r-- | tests/dialects/test_spark.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py index bff91bf..4e62b32 100644 --- a/tests/dialects/test_spark.py +++ b/tests/dialects/test_spark.py @@ -245,7 +245,7 @@ TBLPROPERTIES ( self.validate_identity("SELECT TRANSFORM(ARRAY(1, 2, 3), x -> x + 1)") self.validate_identity("SELECT TRANSFORM(ARRAY(1, 2, 3), (x, i) -> x + i)") self.validate_identity("REFRESH TABLE a.b.c") - self.validate_identity("INTERVAL -86 DAYS") + self.validate_identity("INTERVAL '-86' DAYS") self.validate_identity("TRIM(' SparkSQL ')") self.validate_identity("TRIM(BOTH 'SL' FROM 'SSparkSQLS')") self.validate_identity("TRIM(LEADING 'SL' FROM 'SSparkSQLS')") @@ -801,3 +801,10 @@ TBLPROPERTIES ( self.assertEqual(query.sql(name), with_modifiers) else: self.assertEqual(query.sql(name), without_modifiers) + + def test_schema_binding_options(self): + for schema_binding in ("BINDING", "COMPENSATION", "TYPE EVOLUTION", "EVOLUTION"): + with self.subTest(f"Test roundtrip of VIEW schema binding {schema_binding}"): + self.validate_identity( + f"CREATE VIEW emp_v WITH SCHEMA {schema_binding} AS SELECT * FROM emp" + ) |