Skip to content

GRANT ... TO SHARE not recognized (Snowflake) #109

@devmaha

Description

@devmaha

Component: crates/polyglot-sql/src/parser.rs
Dialect: Snowflake

Description:
Snowflake data sharing uses GRANT ... TO SHARE share_name to grant privileges to a share object. The GRANT parser only recognizes TO ROLE and TO USER as valid grantee types, not TO SHARE.

Example SQL:
sqlGRANT USAGE ON DATABASE mydb TO SHARE sales_share;

Expected behavior:
Parse succeeds. No tables extracted.

Actual behavior:
parse_sql returns ParseError: "Invalid expression / Unexpected token" at SHARE.

Root cause:
The GRANT parser's TO <grantee_type> handler only accepts ROLE and USER. SHARE is a Snowflake-specific grantee type used for secure data sharing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions