[
https://issues.apache.org/jira/browse/SPARK-51324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dusan Tisma updated SPARK-51324:
--------------------------------
Description:
FOR statement will currently fail if it is nested in a compound statement, is
the only statement in that body AND returns an empty result. For example:
{{BEGIN}}
{{ CREATE TABLE t (intCol INT) using parquet;}}
{{ REPEAT}}
{{ FOR SELECT * FROM t ORDER BY intCol DO}}
{{ SELECT intCol;}}
{{ END FOR;}}
{{ UNTIL 1 = 1}}
{{ END REPEAT;}}
END
throws
{{[INTERNAL_ERROR] No more elements to iterate through in the current SQL
compound statement. SQLSTATE: XX000}}
was:
FOR statement will currently fail if it is nested in a compound statement, is
the only statement in that body AND returns an empty result. For example:
{{BEGIN}}
{{ CREATE TABLE t (intCol INT) using parquet;}}
{{ REPEAT}}
{{ FOR SELECT * FROM t ORDER BY intCol DO}}
{{ SELECT intCol;}}
{{ END FOR;}}
{{ UNTIL 1 = 1}}
{{ END REPEAT;}}
{{END
}}
throws
{{[INTERNAL_ERROR] No more elements to iterate through in the current SQL
compound statement. SQLSTATE: XX000}}
> FOR empty results throws error if nested and only statement in body.
> --------------------------------------------------------------------
>
> Key: SPARK-51324
> URL: https://issues.apache.org/jira/browse/SPARK-51324
> Project: Spark
> Issue Type: Sub-task
> Components: Spark Core
> Affects Versions: 4.0.0, 4.1
> Reporter: Dusan Tisma
> Priority: Major
>
> FOR statement will currently fail if it is nested in a compound statement, is
> the only statement in that body AND returns an empty result. For example:
> {{BEGIN}}
> {{ CREATE TABLE t (intCol INT) using parquet;}}
> {{ REPEAT}}
> {{ FOR SELECT * FROM t ORDER BY intCol DO}}
> {{ SELECT intCol;}}
> {{ END FOR;}}
> {{ UNTIL 1 = 1}}
> {{ END REPEAT;}}
> END
> throws
> {{[INTERNAL_ERROR] No more elements to iterate through in the current SQL
> compound statement. SQLSTATE: XX000}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]