Add SECURE keyword for views in Snowflake#2004
Merged
iffyio merged 2 commits intoapache:mainfrom Aug 26, 2025
Merged
Conversation
DanCodedThis
approved these changes
Aug 18, 2025
Contributor
There was a problem hiding this comment.
@Vedin LGTM
P.S. For anybody reviewing, this was an accidental review, delete the review plz
iffyio
reviewed
Aug 20, 2025
src/parser/mod.rs
Outdated
Comment on lines
4716
to
4720
| } 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(); |
Contributor
There was a problem hiding this comment.
Suggested change
| } 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.
Contributor
Author
There was a problem hiding this comment.
Sure, done. snowflake dialect check was removed as well.
Vedin
added a commit
to Embucket/datafusion-sqlparser-rs
that referenced
this pull request
Aug 28, 2025
Vedin
added a commit
to Embucket/datafusion-sqlparser-rs
that referenced
this pull request
Aug 28, 2025
Vedin
added a commit
to Embucket/datafusion-sqlparser-rs
that referenced
this pull request
Sep 16, 2025
ayman-sigma
pushed a commit
to sigmacomputing/sqlparser-rs
that referenced
this pull request
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snowflake views support
SECUREkeyword on creation.https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax
This PR introduced this keyword and view-related logic.