spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davies Liu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-11111) Fast null-safe join
Date Tue, 20 Oct 2015 20:41:27 GMT

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

Davies Liu resolved SPARK-11111.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 1.6.0

Issue resolved by pull request 9120
[https://github.com/apache/spark/pull/9120]

> Fast null-safe join
> -------------------
>
>                 Key: SPARK-11111
>                 URL: https://issues.apache.org/jira/browse/SPARK-11111
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Davies Liu
>            Assignee: Davies Liu
>             Fix For: 1.6.0
>
>
> Today, null safe joins are executed with a Cartesian product.
> {code}
> scala> sqlContext.sql("select * from t a join t b on (a.i <=> b.i)").explain
> == Physical Plan ==
> TungstenProject [i#2,j#3,i#7,j#8]
>  Filter (i#2 <=> i#7)
>   CartesianProduct
>    LocalTableScan [i#2,j#3], [[1,1]]
>    LocalTableScan [i#7,j#8], [[1,1]]
> {code}
> One option is to add this rewrite to the optimizer:
> {code}
> select * 
> from t a 
> join t b 
>   on coalesce(a.i, <default>) = coalesce(b.i, <default>) AND (a.i <=>
b.i)
> {code}
> Acceptance criteria: joins with only null safe equality should not result in a Cartesian
product.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message