Skip to content

Add support for Snowflake account privileges #1666

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

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

yoavcloud
Copy link
Contributor

This PR mostly handles the following part of the GRANT syntax on Snowflake: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege

GRANT { globalPrivileges | ALL [ PRIVILEGES ] } ON ACCOUNT TO [ ROLE ] <role_name> [ WITH GRANT OPTION ]

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

Thanks @yoavcloud! Left one minor comment

#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
pub enum ActionCreateObjectType {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a link to the docs for the introduced enums? I'm thinking since there's a lot of them, especially in the parsing code it'll be useful to know where the syntax is coming from for reference

@alamb
Copy link
Contributor

alamb commented Jan 19, 2025

Hi @yoavcloud -- thank you for all these PRs / features 🙏

Given you are so active in the project and now are quite familar with the code, perhaps you might be interested in helping review other contributor PRs as well? To do so just leave a review and then tag @iffyio and/or myself

The goal would would be to get the PR to point where we can just approve it and merge. I think the big things to check for would be test coverage and style consistency with the rest of the crate

@yoavcloud
Copy link
Contributor Author

Hi @yoavcloud -- thank you for all these PRs / features 🙏

Given you are so active in the project and now are quite familar with the code, perhaps you might be interested in helping review other contributor PRs as well? To do so just leave a review and then tag @iffyio and/or myself

The goal would would be to get the PR to point where we can just approve it and merge. I think the big things to check for would be test coverage and style consistency with the rest of the crate

Hey @alamb I'd like that, yes. Let me try and see how it goes :-)

@yoavcloud yoavcloud requested a review from iffyio January 20, 2025 10:07
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @yoavcloud!

@iffyio iffyio merged commit 183274e into apache:main Jan 20, 2025
9 checks passed
@alamb
Copy link
Contributor

alamb commented Jan 21, 2025

Hey @alamb I'd like that, yes. Let me try and see how it goes :-)

Thanks @yoavcloud -- I look forward to continuted collaboration. This is going to be great

hansott added a commit to hansott/datafusion-sqlparser-rs that referenced this pull request Jan 23, 2025
…o escape-literals

* 'main' of github.com:hansott/datafusion-sqlparser-rs:
  National strings: check if dialect supports backslash escape (apache#1672)
  Add support for Create Iceberg Table statement for Snowflake parser (apache#1664)
  Add support for Snowflake account privileges (apache#1666)
  Update rat_exclude_file.txt (apache#1670)
  Update verson to 0.54.0 and update changelog (apache#1668)
  Add support for Snowflake AT/BEFORE (apache#1667)
  Add support for qualified column names in JOIN ... USING (apache#1663)
  Add support for `IS [NOT] [form] NORMALIZED` (apache#1655)
  fix parsing of `INSERT INTO ... SELECT ... RETURNING ` (apache#1661)
  Add support for Snowflake column aliases that use SQL keywords (apache#1632)
Vedin pushed a commit to Embucket/datafusion-sqlparser-rs that referenced this pull request Feb 3, 2025
Vedin pushed a commit to Embucket/datafusion-sqlparser-rs that referenced this pull request Feb 3, 2025
Vedin added a commit to Embucket/datafusion-sqlparser-rs that referenced this pull request Feb 3, 2025
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Apr 10, 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.

3 participants