-
Notifications
You must be signed in to change notification settings - Fork 605
Support Snowflake Update-From-Select #1604
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
Conversation
Thank you @iffyio for your feedback, I asked your opinion in one of the comments. |
@iffyio appreciate your feedback again 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments, otherwise this looks good to me overall!
@@ -941,6 +941,7 @@ pub const RESERVED_FOR_TABLE_ALIAS: &[Keyword] = &[ | |||
// Reserved for Snowflake table sample | |||
Keyword::SAMPLE, | |||
Keyword::TABLESAMPLE, | |||
Keyword::FROM, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this change related to the PR (wasn't clear to me if so)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
When removing this as a keyword the following error occurs:
Error during parsing: ParserError("Expected: ), found: t1 at Line: 9, Column: 13")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @yuval-illumex!
cc @alamb
Comments Co-authored-by: Ifeanyi Ubah <[email protected]>
Change parameter Co-authored-by: Ifeanyi Ubah <[email protected]>
The following query works in Snowflake:
UPDATE t1 FROM ( SELECT name, id FROM t1 GROUP BY id ) AS t2 SET name = t2.name WHERE t1.id = t2.id
Today the parser only supports update-set-from