GitHub user davidvrba opened a pull request:

    https://github.com/apache/spark/pull/23267

    [SPARK-25401] [SQL] Reorder join predicates to match child outputOrdering

    ## What changes were proposed in this pull request?
    
    In case of SortMergeJoin if tables are bucketed with keys (k1, k2) and 
sorted with keys (k2, k1), EnsureRequirements will add unnecessary SortExec. In 
this PR the improvement is that we reorder join predicate keys once more - to 
align it with child outputOrdering.
    
    ## How was this patch tested?
    
    Adding a new test.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/davidvrba/spark 
spark-25401_reorderJoinPredicates

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/23267.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 #23267
    
----
commit 6022e77877aa2ea2e0e7c6847f31e42ff3f1f1c8
Author: David Vrba <david.vrba@...>
Date:   2018-12-09T20:46:38Z

    spark-25401 reorder join predicates to match child outputOrdering

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to