diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 09:15:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 09:15:16 +0000 |
commit | 93346175ed97c685979fba99a6ae68268484d8c1 (patch) | |
tree | 7674a4f4c8e9b128d79559002aaaea2ead346242 /tests/dialects/test_spark.py | |
parent | Adding upstream version 25.0.3. (diff) | |
download | sqlglot-93346175ed97c685979fba99a6ae68268484d8c1.tar.xz sqlglot-93346175ed97c685979fba99a6ae68268484d8c1.zip |
Adding upstream version 25.1.0.upstream/25.1.0
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py index ecc152f..bff91bf 100644 --- a/tests/dialects/test_spark.py +++ b/tests/dialects/test_spark.py @@ -563,6 +563,7 @@ TBLPROPERTIES ( "SELECT DATE_ADD(my_date_column, 1)", write={ "spark": "SELECT DATE_ADD(my_date_column, 1)", + "spark2": "SELECT DATE_ADD(my_date_column, 1)", "bigquery": "SELECT DATE_ADD(CAST(CAST(my_date_column AS DATETIME) AS DATE), INTERVAL 1 DAY)", }, ) @@ -675,6 +676,16 @@ TBLPROPERTIES ( "spark": "SELECT ARRAY_SORT(x)", }, ) + self.validate_all( + "SELECT DATE_ADD(MONTH, 20, col)", + read={ + "spark": "SELECT TIMESTAMPADD(MONTH, 20, col)", + }, + write={ + "spark": "SELECT DATE_ADD(MONTH, 20, col)", + "databricks": "SELECT DATE_ADD(MONTH, 20, col)", + }, + ) def test_bool_or(self): self.validate_all( |