GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/10630
[SPARK-12656] [SQL] Implement Intersect with Left-semi Join
Our current Intersect physical operator simply delegates to RDD.intersect.
We should remove the Intersect physical operator and simply transform a logical
intersect into a semi-join. This way, we can take advantage of all the benefits
of join implementations (e.g. managed memory, code generation, broadcast joins).
After a search, I found one of the mainstream RDBMS did the same. In their
query explain, Intersect is replaced by Left-semi Join. Left-semi Join could
help outer-join elimination in Optimizer, as shown in the PR:
https://github.com/apache/spark/pull/10566
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark IntersectBySemiJoin
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10630.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 #10630
----
commit 0bd177135bc1c8210fa0ea5a8c7a4c5144d6227e
Author: gatorsmile <[email protected]>
Date: 2016-01-07T05:40:33Z
replace Intersect with Left-semi 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]