You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Allison Wang (Jira)" <ji...@apache.org> on 2022/05/18 02:16:00 UTC
[jira] [Created] (SPARK-39216) Issue with correlated subquery and Union
Allison Wang created SPARK-39216:
------------------------------------
Summary: 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
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