[ 
https://issues.apache.org/jira/browse/SPARK-53758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Milicevic updated SPARK-53758:
------------------------------------
    Summary: [M1] EXIT handler not exiting properly if triggered from another 
EXIT handler  (was: EXIT handler not exiting properly if triggered from another 
EXIT handler)

> [M1] EXIT handler not exiting properly if triggered from another EXIT handler
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-53758
>                 URL: https://issues.apache.org/jira/browse/SPARK-53758
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Spark Core
>    Affects Versions: 4.1.0, 4.0.1
>            Reporter: Teodor
>            Priority: Major
>
> An unexpected behavior happens when an EXIT handler inside of an outer scope 
> gets triggered by an exception inside an EXIT handler thats inside an inner 
> nested scope: instead of leaving the outer scope after finishing all the 
> exception handling, execution only leaves the inner scope.
> Example:
> {code:java}
> BEGIN
>   DECLARE VARIABLE flag INT = -1;
>   l1: BEGIN
>     DECLARE EXIT HANDLER FOR UNRESOLVED_COLUMN.WITHOUT_SUGGESTION
>     BEGIN
>       SELECT flag;
>       SET flag = 2;
>     END;
>     l2: BEGIN
>       DECLARE EXIT HANDLER FOR DIVIDE_BY_ZERO
>       BEGIN
>         SELECT flag;
>         SET flag = 1;
>         select X; -- select non existing variable
>         SELECT 2;
>       END;
>       SELECT 5;
>       SELECT 1/0; -- divide by zero
>       SELECT 6;
>     END l2;
>     SELECT 3, flag;
>   END l1;
> END {code}
>  
> Returns 3, 2 at the end, but it shouldn't reach that part of the code.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to