You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/09/27 08:07:00 UTC
[jira] [Commented] (SPARK-22141) Propagate empty relation before
checking Cartesian products
[ https://issues.apache.org/jira/browse/SPARK-22141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16182161#comment-16182161 ]
Apache Spark commented on SPARK-22141:
--------------------------------------
User 'gengliangwang' has created a pull request for this issue:
https://github.com/apache/spark/pull/19362
> 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
> Priority: Critical
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org