You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2026/06/05 04:17:00 UTC

[jira] [Updated] (SPARK-55119) CONTINUE handler should not interrupt conditional if exception thrown by previous statement

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

Dongjoon Hyun updated SPARK-55119:
----------------------------------
        Parent:     (was: SPARK-48338)
    Issue Type: Bug  (was: Sub-task)

> CONTINUE handler should not interrupt conditional if exception thrown by previous statement 
> --------------------------------------------------------------------------------------------
>
>                 Key: SPARK-55119
>                 URL: https://issues.apache.org/jira/browse/SPARK-55119
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 4.2.0
>            Reporter: Milan Dankovic
>            Assignee: Milan Dankovic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.2.0, 4.1.2
>
>
> When a CONTINUE HANDLER is triggered by an exception thrown from a statement that comes before a conditional statement (IF, WHILE, REPEAT, CASE, etc.) in a loop body, the conditional statement is incorrectly interrupted even though its condition has not been evaluated yet.
>  
> This script fails with [INTERNAL_ERROR] No more elements to iterate through:               
> {code:java}
> BEGIN
>   DECLARE nomorerows BOOLEAN DEFAULT FALSE;
>   DECLARE CONTINUE HANDLER FOR DIVIDE_BY_ZERO
>     SET nomorerows = TRUE;
>   REPEAT
>     SELECT 1/0;  -- Throws exception
>     IF NOT nomorerows THEN  -- Gets incorrectly interrupted
>       SELECT 100;
>     END IF;
>   UNTIL nomorerows
>   END REPEAT;
>   SELECT 'done' as status;
> END; {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org