[
https://issues.apache.org/jira/browse/SPARK-55119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated SPARK-55119:
-----------------------------------
Labels: pull-request-available (was: )
> 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: Sub-task
> Components: Spark Core
> Affects Versions: 4.2.0
> Reporter: Milan Dankovic
> Priority: Major
> Labels: pull-request-available
>
> 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]