GitHub user davies opened a pull request:
https://github.com/apache/spark/pull/9120
[SPARK-11111] [SQL] fast null-safe join
Currently, we use CartesianProduct for join with null-safe-equal condition.
```
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]]
```
Actually, we can have an equal-join condition as `coalesce(i, default) =
coalesce(b.i, default)`, then an partitioned join algorithm could be used.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/davies/spark null_safe
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9120.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9120
----
commit 949c8c379cd580679ef71820f7d26d8c4a987b83
Author: Davies Liu <[email protected]>
Date: 2015-10-14T20:09:38Z
extract joining key for null safe join
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]