Skip to content

CREATE VIEW multiple column options and Snowflake fixes #1891

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eliaperantoni
Copy link
Contributor

@eliaperantoni eliaperantoni commented Jun 18, 2025

A Snowflake query like:

CREATE VIEW X (COL WITH TAG (pii='email') COMMENT 'foobar') AS SELECT * FROM Y

Would've previously failed because of two reasons:

  • It contains two options for the COL column, but only one is currently parsed for CREATE VIEW statements.
  • It uses an option other than COMMENT, which is the only one currently supported for the Snowflake dialect.

This PR fixes both.

Additionally, it records in the AST whether the options are comma separated or not. Otherwise, ToString wouldn't produce a syntactically valid query for Snowflake.

@eliaperantoni eliaperantoni changed the title Support multiple column options in CREATE VIEW Support multiple column options in CREATE VIEW (and non-comment options for Snowflake) Jun 18, 2025
@eliaperantoni eliaperantoni changed the title Support multiple column options in CREATE VIEW (and non-comment options for Snowflake) CREATE VIEW multiple column options and Snowflake fixes Jun 18, 2025
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.

1 participant