bombsimon commented on code in PR #1884: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1884#discussion_r2152166881
########## src/ast/mod.rs: ########## @@ -3670,17 +3727,24 @@ pub enum Statement { /// END; /// ``` statements: Vec<Statement>, - /// Statements of an exception clause. + /// Exception handling with exception clauses and raises. /// Example: /// ```sql /// BEGIN /// SELECT 1; - /// EXCEPTION WHEN ERROR THEN - /// SELECT 2; - /// SELECT 3; + /// EXCEPTION + /// WHEN EXCEPTION_1 THEN + /// SELECT 2; + /// WHEN EXCEPTION_2 OR EXCEPTION_3 THEN + /// SELECT 3; + /// WHEN OTHER THEN + /// SELECT 4; + /// RAISE; Review Comment: So what's your conclusion around the quote I pasted from [the BigQuery docs](https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language#raise) > The RAISE statement must only be used within an EXCEPTION clause. The RAISE statement will re-raise the exception that was caught, and preserve the original stack trace. We just treat that as semantics and put the raise directly on the `StartTransaction` struct together with a `Vec<ExceptionWhen>`? > So that it seems to me that we should be able to leave as is in the previous behavior of treating RAISE as a regular statement. You mean the `RAISE` should be a regular statement in the last `ExceptionWhen`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org