Skip to content

Conversation

MasterOdin
Copy link
Member

PR improves parsing BigQuery control structures so that they're fully detected as their own potential standalone statements. Unlike Oracle, BigQuery's procedural language can be used without first using DECLARE or SET or BEGIN and can be completely standalone, and so we need to be able to detect that these are separate statements, and not part of a larger ANON_BLOCK like Oracle. BEGIN though for BigQuery can start an anon_block if it's the first word, and not followed by "TRANSACTION" which gives similar behavior as Oracle for that.

See CASE or FOR in the below examples as statements that are completely standalone. The other loop structures probably expect a DECLARE or SET before it, but there's no guarantee.

@MasterOdin MasterOdin merged commit 9982407 into main Aug 26, 2022
@MasterOdin MasterOdin deleted the bugfix-bigquery branch August 26, 2022 15:09
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