[ https://issues.apache.org/jira/browse/SPARK-31280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved SPARK-31280. ----------------------------------- Fix Version/s: 3.1.0 Resolution: Fixed Issue resolved by pull request 28043 [https://github.com/apache/spark/pull/28043] > Perform propagating empty relation after RewritePredicateSubquery > ----------------------------------------------------------------- > > Key: SPARK-31280 > URL: https://issues.apache.org/jira/browse/SPARK-31280 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.1.0 > Reporter: Kent Yao > Assignee: Kent Yao > Priority: Major > Fix For: 3.1.0 > > > {code:java} > scala> spark.sql(" select * from values(1), (2) t(key) where key in (select 1 > as key where 1=0)").queryExecution > res15: org.apache.spark.sql.execution.QueryExecution = > == Parsed Logical Plan == > 'Project [*] > +- 'Filter 'key IN (list#39 []) > : +- Project [1 AS key#38] > : +- Filter (1 = 0) > : +- OneRowRelation > +- 'SubqueryAlias t > +- 'UnresolvedInlineTable [key], [List(1), List(2)] > == Analyzed Logical Plan == > key: int > Project [key#40] > +- Filter key#40 IN (list#39 []) > : +- Project [1 AS key#38] > : +- Filter (1 = 0) > : +- OneRowRelation > +- SubqueryAlias t > +- LocalRelation [key#40] > == Optimized Logical Plan == > Join LeftSemi, (key#40 = key#38) > :- LocalRelation [key#40] > +- LocalRelation <empty>, [key#38] > == Physical Plan == > *(1) BroadcastHashJoin [key#40], [key#38], LeftSemi, BuildRight > :- *(1) LocalTableScan [key#40] > +- Br... > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org