Skip to content

Conversation

Vedin
Copy link
Contributor

@Vedin Vedin commented Aug 18, 2025

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.

Copy link
Contributor

@DanCodedThis DanCodedThis left a 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

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();
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

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.

@Vedin Vedin requested a review from iffyio August 25, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants