From 9c5cf7fc4a20988d0eda33e4a3afdf7168c05104 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 25 Nov 2024 08:23:18 +0100 Subject: Merging upstream version 25.32.0. Signed-off-by: Daniel Baumann --- tests/dialects/test_snowflake.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests/dialects/test_snowflake.py') diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py index 515a07c..8058bcf 100644 --- a/tests/dialects/test_snowflake.py +++ b/tests/dialects/test_snowflake.py @@ -1479,13 +1479,20 @@ WHERE "snowflake": "CREATE OR REPLACE TRANSIENT TABLE a (id INT)", }, ) - self.validate_all( "CREATE TABLE a (b INT)", read={"teradata": "CREATE MULTISET TABLE a (b INT)"}, write={"snowflake": "CREATE TABLE a (b INT)"}, ) + self.validate_identity("CREATE TABLE a TAG (key1='value_1', key2='value_2')") + self.validate_all( + "CREATE TABLE a TAG (key1='value_1')", + read={ + "snowflake": "CREATE TABLE a WITH TAG (key1='value_1')", + }, + ) + for action in ("SET", "DROP"): with self.subTest(f"ALTER COLUMN {action} NOT NULL"): self.validate_all( @@ -2250,3 +2257,13 @@ SINGLE = TRUE""", self.validate_identity( "GRANT ALL PRIVILEGES ON FUNCTION mydb.myschema.ADD5(number) TO ROLE analyst" ) + + def test_window_function_arg(self): + query = "SELECT * FROM TABLE(db.schema.FUNC(a) OVER ())" + + ast = self.parse_one(query) + window = ast.find(exp.Window) + + self.assertEqual(ast.sql("snowflake"), query) + self.assertEqual(len(list(ast.find_all(exp.Column))), 1) + self.assertEqual(window.this.sql("snowflake"), "db.schema.FUNC(a)") -- cgit v1.2.3