Skip to content

Snowflake: Support IDENTIFIER for GRANT ROLE #1957

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

yoavcloud
Copy link
Contributor

No description provided.

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.

@yoavcloud double checking the intent is to add ObjectName support rather than Identifier as the MR description mentions?

@@ -6623,7 +6623,7 @@ pub enum Action {
Replicate,
ResolveAll,
Role {
role: Ident,
role: ObjectName,
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 test that uses a qualified name when mentioning the role? e.g. GRANT ROLE a.b.c to role d.e.f

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it in tests/sqlparser_snowflake.rs using the IDENTIFIER function. Qualified role names are not allowed in Snowflake (only database roles can be qualified).

@yoavcloud yoavcloud requested a review from iffyio July 21, 2025 13:52
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