-
Notifications
You must be signed in to change notification settings - Fork 632
Add SECURE keyword for views in Snowflake #2004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vedin LGTM
P.S. For anybody reviewing, this was an accidental review, delete the review plz
src/parser/mod.rs
Outdated
} else if self.parse_keyword(Keyword::MATERIALIZED) | ||
|| self.parse_keyword(Keyword::VIEW) | ||
|| (dialect_of!(self is SnowflakeDialect) && self.parse_keyword(Keyword::SECURE)) | ||
{ | ||
self.prev_token(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else if self.parse_keyword(Keyword::MATERIALIZED) | |
|| self.parse_keyword(Keyword::VIEW) | |
|| (dialect_of!(self is SnowflakeDialect) && self.parse_keyword(Keyword::SECURE)) | |
{ | |
self.prev_token(); | |
} else if self.peek_keyword(Keyword::MATERIALIZED) | |
|| self.peek_keyword(Keyword::VIEW) | |
|| self.peek_keywords(&[Keyword::SECURE, Keyword::MATERIALIZED]) | |
|| self.peek_keywords(&[Keyword::SECURE, Keyword::VIEW]) | |
|| (dialect_of!(self is SnowflakeDialect) && self.parse_keyword(Keyword::SECURE)) | |
{ |
We could probably do something like this? also I imagine no need for the snowflakeDialect check since the syntax doesn't conflict with other dialects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done. snowflake dialect check was removed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snowflake views support
SECURE
keyword on creation.https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax
This PR introduced this keyword and view-related logic.