Skip to content

Fix queries classified as Unknown statement type by updating parsing dialect=snowflake#170

Open
edmundyan wants to merge 1 commit intoSnowflake-Labs:mainfrom
edmundyan:eyan/dialect_snowflake
Open

Fix queries classified as Unknown statement type by updating parsing dialect=snowflake#170
edmundyan wants to merge 1 commit intoSnowflake-Labs:mainfrom
edmundyan:eyan/dialect_snowflake

Conversation

@edmundyan
Copy link

sqlglot.parse_one() was called without a dialect, so Snowflake's ::type cast syntax caused a ParseError. This resulted in queries using colon-path access with a cast (e.g. v:key::string) being classified as Unknown and rejected by sql_statement_permissions, even when Select was explicitly allowed.

Fix: pass indialect="snowflake"

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.

1 participant