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

Herman van Hovell resolved SPARK-22141.
---------------------------------------
       Resolution: Fixed
         Assignee: Gengliang Wang
    Fix Version/s: 2.3.0

> Propagate empty relation before checking Cartesian products
> -----------------------------------------------------------
>
>                 Key: SPARK-22141
>                 URL: https://issues.apache.org/jira/browse/SPARK-22141
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Critical
>             Fix For: 2.3.0
>
>
> When inferring constraints from children, Join's condition can be simplified 
> as None.
> For example,
>     val testRelation = LocalRelation('a.int)
>     val x = testRelation.as("x")
>     val y = testRelation.where($"a" === 2 && !($"a" === 2)).as("y")
>     x.join(y).where($"x.a" === $"y.a")
> The plan will become
> Join Inner
> :- LocalRelation <empty>, [a#23]
> +- LocalRelation <empty>, [a#224]
> And the Cartesian products check will throw exception.
> Propagate empty relation before checking Cartesian products, and the issue is 
> resolved.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to