GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/10891
[SQL] Eliminate Bucketing Columns that are part of Partitioning Columns
When users are using partitionBy and bucketBy at the same time, some
bucketing columns might be part of partitioning columns. For example,
```
df.write
.format(source)
.partitionBy("i")
.bucketBy(8, "i", "k")
.sortBy("k")
.saveAsTable("bucketed_table")
```
However, in the above case, adding column `i` is useless. It is just
wasting extra CPU when reading or writing bucket tables. Thus, we can
automatically remove these overlapping columns from the bucketing columns.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark
commonKeysInPartitionByBucketBy
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10891.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 #10891
----
commit 14fb29d1cc8b30681026ad29f7fc674695644a62
Author: gatorsmile <[email protected]>
Date: 2016-01-24T23:56:30Z
remove unnecessary columns from blockBy
commit e68351bccd7911f55cade845918ecc2494271d2f
Author: gatorsmile <[email protected]>
Date: 2016-01-25T00:26:48Z
added more test cases.
commit e529b7d15f85557d6ccfa7f08f7bacb71611a286
Author: gatorsmile <[email protected]>
Date: 2016-01-25T00:27:32Z
Merge remote-tracking branch 'upstream/master' into
commonKeysInPartitionByBucketBy
----
---
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]