[PIVOT] Optional AS keyword for aliases - #2209
Merged
Merged
Conversation
iffyio
approved these changes
Feb 18, 2026
sabir-akhadov-localstack
added a commit
to localstack/datafusion-sqlparser-rs
that referenced
this pull request
Aug 22, 2026
…oving the privilege (account + database role) (apache#2209) * Task LAV-1748: REVOKE GRANT OPTION FOR — flip grant_option without removing privilege Add end-to-end support for REVOKE GRANT OPTION FOR <privileges> ON <object> FROM {ROLE <name> | DATABASE ROLE <db>.<name>}. The statement flips grant_option to false on matching live grant edges, keeping the privilege edge itself intact. The status string reports the count of edges actually flipped: 'Statement executed successfully. N objects affected.' Parser: add grant_option_for field to Revoke struct; parse the GRANT OPTION FOR prefix in parse_revoke. Transform: route grant_option_for revokes to a new __snowflake UDF instead of the soft-deleting __snowflake. Extension: the new UDF validates role existence (002003/02000 for missing roles), flips grant_option to false + refreshes created_at on matching live edges, counts flipped rows via GET DIAGNOSTICS, and returns the N-objects status. ALL PRIVILEGES expands to match-all (null privilege), flipping every matching edge. Compat tests cover the true→false flip with privilege retained, the repeat-revoke 0-objects case, the never-granted 0-objects case, the ALL PRIVILEGES multi-edge case, the FROM DATABASE ROLE variant, and the missing-role error path. Snapshots captured against real Snowflake. Co-Authored-By: Claude <noreply@anthropic.com> * task LAV-1748: fix CI — add grant_option_for to Revoke destructuring in vendored sqlparser tests --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.