Skip to content

Add parsing for GRANT ROLE and GRANT DATABASE ROLE in Snowflake dialect #1689

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 3 commits into from
Feb 3, 2025

Conversation

yoavcloud
Copy link
Contributor

No description provided.

src/ast/mod.rs Outdated
@@ -5912,6 +5924,7 @@ impl fmt::Display for GrantObjects {
display_comma_separated(schemas)
)
}
GrantObjects::None => Ok(()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we instead make GrantObjects optional at the usage sites that require it? i.e. objects: Option<GrantObjects>. Thinking so that we get the None representation by convention

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion, fixed in the last commit

@yoavcloud yoavcloud force-pushed the sf_grant_role_dbrole branch from 41b29fb to 376dffc Compare February 3, 2025 12:43
@yoavcloud yoavcloud requested a review from iffyio February 3, 2025 12:46
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!
cc @alamb

@iffyio iffyio merged commit ec948ea into apache:main Feb 3, 2025
9 checks passed
@alamb
Copy link
Contributor

alamb commented Feb 4, 2025

Rolling along ☸️

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