summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_snowflake.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 09:15:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 09:15:19 +0000
commit5ac403c53fc7e610ee679587187546a61e2e342b (patch)
tree819e7e322201cb0206e429e6590ae85f3676e68d /tests/dialects/test_snowflake.py
parentReleasing debian version 25.0.3-1. (diff)
downloadsqlglot-5ac403c53fc7e610ee679587187546a61e2e342b.tar.xz
sqlglot-5ac403c53fc7e610ee679587187546a61e2e342b.zip
Merging upstream version 25.1.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/dialects/test_snowflake.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py
index 9d9371d..1286436 100644
--- a/tests/dialects/test_snowflake.py
+++ b/tests/dialects/test_snowflake.py
@@ -125,6 +125,10 @@ WHERE
"SELECT a:from::STRING, a:from || ' test' ",
"SELECT CAST(GET_PATH(a, 'from') AS TEXT), GET_PATH(a, 'from') || ' test'",
)
+ self.validate_identity(
+ "SELECT a:select",
+ "SELECT GET_PATH(a, 'select')",
+ )
self.validate_identity("x:from", "GET_PATH(x, 'from')")
self.validate_identity(
"value:values::string::int",
@@ -1196,16 +1200,16 @@ WHERE
for constraint_prefix in ("WITH ", ""):
with self.subTest(f"Constraint prefix: {constraint_prefix}"):
self.validate_identity(
- f"CREATE TABLE t (id INT {constraint_prefix}MASKING POLICY p)",
- "CREATE TABLE t (id INT MASKING POLICY p)",
+ f"CREATE TABLE t (id INT {constraint_prefix}MASKING POLICY p.q.r)",
+ "CREATE TABLE t (id INT MASKING POLICY p.q.r)",
)
self.validate_identity(
f"CREATE TABLE t (id INT {constraint_prefix}MASKING POLICY p USING (c1, c2, c3))",
"CREATE TABLE t (id INT MASKING POLICY p USING (c1, c2, c3))",
)
self.validate_identity(
- f"CREATE TABLE t (id INT {constraint_prefix}PROJECTION POLICY p)",
- "CREATE TABLE t (id INT PROJECTION POLICY p)",
+ f"CREATE TABLE t (id INT {constraint_prefix}PROJECTION POLICY p.q.r)",
+ "CREATE TABLE t (id INT PROJECTION POLICY p.q.r)",
)
self.validate_identity(
f"CREATE TABLE t (id INT {constraint_prefix}TAG (key1='value_1', key2='value_2'))",