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/dialects/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ class Snowflake(Dialect):
exp.AIAgg,
exp.AIClassify,
exp.AISummarizeAgg,
exp.Chr,
exp.Collate,
exp.RegexpExtract,
exp.RegexpReplace,
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 @@ -34,6 +34,7 @@ def test_snowflake(self):
"SELECT BASE64_DECODE_BINARY('SGVsbG8=', 'ABCDEFGHwxyz0123456789+/')"
)

self.validate_identity("SELECT CHR(8364)")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this test, we already test it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't seem like we test snowflake? it's fine for just this one

self.validate_identity("SELECT {*} FROM my_table")
self.validate_identity("SELECT {my_table.*} FROM my_table")
self.validate_identity("SELECT {* ILIKE 'col1%'} FROM my_table")
Expand Down
8 changes: 8 additions & 0 deletions tests/fixtures/optimizer/annotate_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,14 @@ INT;
CHARINDEX('world', 'hello world', 1);
INT;

# dialect: snowflake
CHAR(65);
VARCHAR;

# dialect: snowflake
CHR(8364);
VARCHAR;

# dialect: snowflake
COLLATE('hello', 'utf8');
VARCHAR;
Expand Down