Skip to content
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

Snowflake - Add support in CLUSTER BY when creating Materialised View #736

Merged
merged 1 commit into from Nov 30, 2022

Conversation

yuval-illumex
Copy link
Contributor

According to snowflake docs, The last optional parameter is CLUSTER BY

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3573835180

  • 38 of 38 (100.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 86.392%

Files with Coverage Reduction New Missed Lines %
src/ast/mod.rs 1 77.52%
Totals Coverage Status
Change from base Build 3568725328: 0.03%
Covered Lines: 11923
Relevant Lines: 13801

💛 - Coveralls

Copy link
Collaborator

@alamb alamb left a comment

Choose a reason for hiding this comment

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

As always, thank you @yuval-illumex 👍 Really appreciate all the help here

@@ -1114,6 +1114,7 @@ pub enum Statement {
columns: Vec<Ident>,
query: Box<Query>,
with_options: Vec<SqlOption>,
cluster_by: Vec<Ident>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

https://docs.snowflake.com/en/sql-reference/sql/create-materialized-view.html says

  [ CLUSTER BY ( <expr1> [, <expr2> ... ] ) ]

But this PR has cluster by as only columns (not expressions).

I am fine with merging this as is but I wonder if you want to support the more general syntax?

@alamb
Copy link
Collaborator

alamb commented Nov 30, 2022

We can make the "Expr" change in a follow on PR if desired. For now I think this is an improvement over main so I am merging it in

@alamb alamb merged commit a422116 into sqlparser-rs:main Nov 30, 2022
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.

None yet

3 participants