[ https://issues.apache.org/jira/browse/SPARK-51324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-51324. --------------------------------- Fix Version/s: 4.0.0 Resolution: Fixed Issue resolved by pull request 50090 [https://github.com/apache/spark/pull/50090] > 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 > Fix For: 4.0.0 > > > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org