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.
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.