You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2025/02/27 00:45:00 UTC
[jira] [Assigned] (SPARK-51324) FOR empty results throws error if nested and only statement in body.
[ https://issues.apache.org/jira/browse/SPARK-51324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan reassigned SPARK-51324:
-----------------------------------
Assignee: Dusan Tisma
> 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
> Assignee: Dusan Tisma
> Priority: Major
> Labels: pull-request-available
>
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org