You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/03/31 02:20:00 UTC

[jira] [Updated] (SPARK-31280) Perform propagating empty relation after RewritePredicateSubquery

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

Dongjoon Hyun updated SPARK-31280:
----------------------------------
    Fix Version/s:     (was: 3.1.0)

> 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
>
> {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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org