Skip to content

SGA-11419 Added snowflake ability for if not exists after create view… #1961

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 1 commit into
base: main
Choose a base branch
from

Conversation

etgarperets
Copy link
Contributor

…, also added ability to write view name before if not exists in snowflake as it is implemented, replaced dialect of with trait functions

…, also added ability to write view name before if not exists in snowflake as it is implemented, replaced dialect of with trait functions
Box::new(BigQueryDialect {}),
]);
let _ = dialects.verified_stmt(sql);
let sql = "CREATE VIEW v IF NOT EXISTS AS SELECT 1";
Copy link
Contributor

Choose a reason for hiding this comment

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

From a quick look I couldn't find which dialects in practice support this syntax? Do you have a link to documentation for one such dialect?

related the MR not super sure it would be necessary to have this behavior covered by a flag and the parser can always look to accept CREATE VIEW IF NOT EXISTS v, as well as the other syntax if its relevant)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I couldn't find official documentation for this syntax, though we have confirmed it works in practice on Snowflake.

I'm happy to remove the dialect flag and update the parser to support both forms for all dialects. Let me know if you'd like me to proceed with that change.

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.

2 participants