Results 2 issues of Himadri Pal

#7557 Support Rewrite Datafiles into a custom Partition Spec

API
spark
core

### What changes were proposed in this pull request? SPJ compatible bucket issue has an implementation of reducible function. This patch fixes the implementation and make it same as in...

SQL