summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 07:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 07:23:18 +0000
commit9c5cf7fc4a20988d0eda33e4a3afdf7168c05104 (patch)
tree85160e0a3a39feede46b7546566279525b3af373 /tests/dialects/test_dialect.py
parentReleasing debian version 25.31.4-1. (diff)
downloadsqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.tar.xz
sqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.zip
Merging upstream version 25.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index f0711fc..c1aa054 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -2854,6 +2854,13 @@ FROM subquery2""",
},
)
+ self.validate_all(
+ "SELECT ARRAY_LENGTH(GENERATE_DATE_ARRAY(DATE '2020-01-01', DATE '2020-02-01', INTERVAL 1 WEEK))",
+ write={
+ "snowflake": "SELECT ARRAY_SIZE((SELECT ARRAY_AGG(*) FROM (SELECT DATEADD(WEEK, CAST(value AS INT), CAST('2020-01-01' AS DATE)) AS value FROM TABLE(FLATTEN(INPUT => ARRAY_GENERATE_RANGE(0, (DATEDIFF(WEEK, CAST('2020-01-01' AS DATE), CAST('2020-02-01' AS DATE)) + 1 - 1) + 1))) AS _u(seq, key, path, index, value, this))))",
+ },
+ )
+
def test_set_operation_specifiers(self):
self.validate_all(
"SELECT 1 EXCEPT ALL SELECT 1",