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 2022/05/18 07:56:00 UTC
[jira] [Commented] (SPARK-39216) Issue with correlated subquery and Union
[ https://issues.apache.org/jira/browse/SPARK-39216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538640#comment-17538640 ]
Wenchen Fan commented on SPARK-39216:
-------------------------------------
[~yumwang] can you take a look?
> Issue with correlated subquery and Union
> ----------------------------------------
>
> Key: SPARK-39216
> URL: https://issues.apache.org/jira/browse/SPARK-39216
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.3.0
> Reporter: Allison Wang
> Priority: Major
>
>
> SPARK-37915 added CollapseProject in rule CombineUnions, but it shouldn't collapse projects that contain correlated subqueries since haven't been de-correlated (PullupCorrelatedPredicates).
> Here is a simple example to reproduce this issue
> {code:java}
> SELECT (SELECT IF(x, 1, 0)) AS a
> FROM (SELECT true) t(x)
> UNION
> SELECT 1 AS a {code}
> Exception:
> {code:java}
> java.lang.IllegalStateException: Couldn't find x#4 in [] {code}
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org