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 2024/02/07 03:55:00 UTC

[jira] [Resolved] (SPARK-46526) Limit over certain correlated subqueries results in Nosuchelement exception

     [ https://issues.apache.org/jira/browse/SPARK-46526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-46526.
---------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 44514
[https://github.com/apache/spark/pull/44514]

> Limit over certain correlated subqueries results in Nosuchelement exception
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-46526
>                 URL: https://issues.apache.org/jira/browse/SPARK-46526
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Andrey Gubichev
>            Assignee: Andrey Gubichev
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> The types of queries that result in errors are:
>  * have LIMIT in the subquery
>  * predicate with correlated references does not depend on the inner query (references exclusively outer table).
> For example:
> {code:java}
> SELECT COUNT(DISTINCT(t1a))
> FROM t1
> WHERE t1d IN (SELECT t2d
>               FROM   t2
>               WHERE t1a IS NOT NULL
>               LIMIT 10);
>  {code}
> Here, WHERE t1a IS NOT NULL can be conceptually lifted to the join that connects inner and outer query. 
> Currently, this query results in an error ("no such element exception").



--
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