Uh oh!
There was an error while loading. Please reload this page.
[SPARK-17729] [SQL] Enable creating hive bucketed tables - #15300
[SPARK-17729] [SQL] Enable creating hive bucketed tables#15300tejasapatil wants to merge 2 commits into
Conversation
SparkQA
commented
Sep 29, 2016
Test build #66112 has finished for PR 15300 at commit
|
tejasapatil
commented
Sep 30, 2016
cc @hvanhovell , @cloud-fan for review |
SparkQA
commented
Sep 30, 2016
Test build #66140 has finished for PR 15300 at commit
|
| "currently does NOT populate bucketed output which is compatible with Hive." | ||
| if (hadoopConf.get(enforceBucketingConfig, "false").toBoolean || | ||
| hadoopConf.get(enforceSortingConfig, "false").toBoolean) { |
There was a problem hiding this comment.
Are the default values (false) for these two configs safe? If user doesn't aware of it, it could insert non compatible data into bucketed Hive table.
There was a problem hiding this comment.
@viirya : Even right now on trunk if you try to insert data into a bucketed table, it will just work w/o producing bucketed output. I don't want to break that for existing users by making these true. The eventual goal would be to not have these configs and Spark should always produce data adhering to the tables' bucketing spec (without breaking existing pipelines).
tejasapatil
commented
Oct 6, 2016
@hvanhovell , @cloud-fan : Can you please review this PR ? |
tejasapatil
commented
Oct 26, 2016
@hvanhovell , @cloud-fan : Can you please review this PR ? |
cloud-fan
commented
Jan 14, 2017
ok now I have time to work on it. do you have a plan/design for bucketed hive table? Because Spark and Hive have different hash implementations, we need a way to distinguish native bucketed hive table(use hive hash) and spark written bucketed hive table(use spark hash). |
tejasapatil
commented
Jan 14, 2017
@cloud-fan : Thanks for reaching out. I wanted ship this internally within Facebook for one of the internal use cases so didn't maintain / followup on this PR. I will put out a design over the weekend so that we can discuss it. We want to have all the changes pushed upstream so that everyone benefits and we don't have to maintain a fork. |
tejasapatil
commented
Jan 17, 2017
@cloud-fan : I have linked a proposal in https://issues.apache.org/jira/browse/SPARK-19256. |
tejasapatil
commented
Apr 15, 2017
since trunk had diverged a lot since this PR was created, closed this and created a fresh one at : #17644 |
What changes were proposed in this pull request?
Hive allows inserting data to bucketed table without guaranteeing bucketed and sorted-ness based on these two configs :
hive.enforce.bucketingandhive.enforce.sorting.What does this PR achieve ?
hive.enforce.bucketing=falseandhive.enforce.sorting=falsewhich means user does NOT care about bucketing guarantees.Changes done in this PR:
HiveClientImplMetastoreRelationnow populates the bucketing information in the hiveTableobjectInsertIntoHiveTableallows inserts to bucketed table only if bothhive.enforce.bucketingandhive.enforce.sortingarefalseAbility to create bucketed tables will enable adding test cases to Spark while I add pieces to make Spark support hive bucketing (eg. #15229, #15047, #15040)
How was this patch tested?
SHOW CREATE TABLEworks for hive bucketed tables