[
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: [email protected]
For additional commands, e-mail: [email protected]