Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sqlglot/typing/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def _annotate_str_to_time(self: TypeAnnotator, expression: exp.StrToTime) -> exp
exp.ArrayAppend,
exp.ArrayConstructCompact,
exp.ArrayPrepend,
exp.ArrayRemove,
exp.ArrayUniqueAgg,
exp.ArrayUnionAgg,
exp.MapKeys,
Expand Down
1 change: 1 addition & 0 deletions tests/dialects/test_snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def test_snowflake(self):
self.validate_identity("SELECT ARRAY_UNIQUE_AGG(x)")
self.validate_identity("SELECT ARRAY_APPEND([1, 2, 3], 4)")
self.validate_identity("SELECT ARRAY_PREPEND([2, 3, 4], 1)")
self.validate_identity("SELECT ARRAY_REMOVE([1, 2, 3], 2)")
self.validate_identity("SELECT AI_AGG(review, 'Summarize the reviews')")
self.validate_identity("SELECT AI_SUMMARIZE_AGG(review)")
self.validate_identity("SELECT AI_CLASSIFY('text', ['travel', 'cooking'])")
Expand Down
4 changes: 4 additions & 0 deletions tests/fixtures/optimizer/annotate_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,10 @@ ARRAY;
ARRAY_PREPEND([2, 3, 4], 1);
ARRAY;

# dialect: snowflake
ARRAY_REMOVE([1, 2, 3], 2);
ARRAY;

# dialect: snowflake
ASIN(tbl.double_col);
DOUBLE;
Expand Down