Skip to content

Commit 35e683d

Browse files
authored
[Snowflake] Add new features and tags test (#3845)
1 parent 3564c63 commit 35e683d

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

sql/snowflake/SnowflakeParser.g4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ clustering_action
11341134
;
11351135

11361136
table_column_action
1137-
: ADD COLUMN? column_name data_type
1137+
: ADD COLUMN? if_not_exists? column_name data_type
11381138
default_value?
11391139
inline_constraint?
11401140
( WITH? MASKING POLICY id_ ( USING '(' column_name COMMA column_list ')' )? )?
@@ -1154,7 +1154,7 @@ table_column_action
11541154
| alter_modify COLUMN column_name UNSET MASKING POLICY
11551155
| alter_modify column_set_tags (COMMA column_set_tags)*
11561156
| alter_modify column_unset_tags (COMMA column_unset_tags)*
1157-
| DROP COLUMN? column_list
1157+
| DROP COLUMN? if_exists? column_list
11581158
;
11591159

11601160
inline_constraint
@@ -2490,7 +2490,7 @@ create_tag
24902490
;
24912491

24922492
tag_allowed_values
2493-
: ALLOWED_VALUES tag_value (COMMA tag_value)*
2493+
: ALLOWED_VALUES string_list
24942494
;
24952495

24962496
session_parameter

sql/snowflake/examples/tables.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
create table t(i int);
2+
3+
alter table t add column if not exists j int;
4+
alter table t drop column if exists i;

sql/snowflake/examples/tags.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
create tag sch.tag1 allowed_values 'a', 'b';
2+
create tag db.sch.tag2 allowed_values 'a', 'b' comment = '';
3+
create tag tag3 comment = '';

0 commit comments

Comments
 (0)