bombsimon commented on code in PR #1884:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1884#discussion_r2152230149


##########
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:
   I went ahead and dropped the new `ExceptionClasue` which then also includes 
the custom handling of `RAISE`. `RAISE` will now be a regular statement in the 
block which I actually THINK is correct given something like this:
   
   ```sql
   BEGIN
       SELECT 1;
   EXCEPTION
       WHEN EXCEPTION_1 THEN
           SELECT 1;
           RAISE SOME_OTHER_EX;
   RAISE;
   END;
   ```
   
   With this I moved all the `ExceptionWhen` directly under the 
`StartTransaction` similar to previous statement list.



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

Reply via email to