You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task LAV-1748: REVOKE GRANT OPTION FOR: flip grant_option without removing 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>
0 commit comments