GitHub user gengliangwang opened a pull request:
https://github.com/apache/spark/pull/19825
[SPARK-22615][SQL] Handle more cases in PropagateEmptyRelation
## What changes were proposed in this pull request?
Currently, in the optimize rule `PropagateEmptyRelation`, the following
cases is not handled:
1. right child is empty relation in left outer join
2. left child in right outer join
3. right child is empty relation in left semi join
4. right child is empty relation in left anti join
case #1 and #2 can be treated as **cross join** and cause exception. See
the test case in JoinSuite.
## How was this patch tested?
Unit test
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gengliangwang/spark SPARK-22615
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19825.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 #19825
----
commit cde04c8a42a545dd3fe04044637b7e50a64053bc
Author: Wang Gengliang <[email protected]>
Date: 2017-11-27T12:44:14Z
Handle more cases in PropagateEmptyRelation
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]