GitHub user pwoody opened a pull request:

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

    [SPARK-21317][SQL] Avoid sorting on bucket expression if data is already 
bucketed

    ## What changes were proposed in this pull request?
    
    When saving bucketed data, each task will sort it's partition by the 
partition id produce by the HashPartitioning of the bucket column. If the input 
data is already partitioned by the bucket partitioning, then this value will be 
constant, making the sort unnecessary.
    
    ## How was this patch tested?
    Manual tests + debugging. Not sure what the easiest way to plug into 
verifying the plan inside the writer would have a sort or not.

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

    $ git pull https://github.com/pwoody/spark SPARK-21317

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

    https://github.com/apache/spark/pull/18542.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 #18542
    
----
commit 557837990dcfb17e19480bc3ea80ac685a8b3c32
Author: Patrick Woody <pwo...@palantir.com>
Date:   2017-07-05T13:58:38Z

    Avoid sort on bucket expression if data is already bucketed

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to