You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2022/10/03 18:26:00 UTC

[jira] [Resolved] (SPARK-40618) Bug in MergeScalarSubqueries rule attempting to merge nested subquery with parent

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

Gengliang Wang resolved SPARK-40618.
------------------------------------
    Fix Version/s: 3.4.0
       Resolution: Fixed

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

> Bug in MergeScalarSubqueries rule attempting to merge nested subquery with parent
> ---------------------------------------------------------------------------------
>
>                 Key: SPARK-40618
>                 URL: https://issues.apache.org/jira/browse/SPARK-40618
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Daniel
>            Assignee: Daniel
>            Priority: Major
>             Fix For: 3.4.0
>
>
> There is a bug in the `MergeScalarSubqueries` rule for queries with subquery expressions nested inside each other, wherein the rule attempts to merge the nested subquery with its enclosing parent subquery. The result is not a valid plan and raises an exception in the optimizer. Here is a minimal reproducing case:
>  
> ```
> sql("create table test(col int) using csv")
> checkAnswer(sql("select(select sum((select sum(col) from test)) from test)"), Row(null))
> ```



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