diff options
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_snowflake.py | 19 |
1 files changed, 18 insertions, 1 deletions
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)") |