Skip to content

Commit 262475e

Browse files
committed
snowflake: allow idents to start with $
1 parent c645682 commit 262475e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/dialect/snowflake.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ pub struct SnowflakeDialect;
1717

1818
impl Dialect for SnowflakeDialect {
1919
// see https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html
20+
// NOTE: $ is not generally a valid identifier start, but it is expected when
21+
// querying stages:
22+
// https://docs.snowflake.com/en/user-guide/querying-stage.html#query-syntax-and-parameters
2023
fn is_identifier_start(&self, ch: char) -> bool {
21-
(ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_'
24+
(ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_' || ch == '$'
2225
}
2326

2427
fn is_identifier_part(&self, ch: char) -> bool {

0 commit comments

Comments
 (0)