[python] Support FileStoreCommit overwrite dynamic partition#7749
Open
SteNicholas wants to merge 1 commit intoapache:masterfrom
Open
[python] Support FileStoreCommit overwrite dynamic partition#7749SteNicholas wants to merge 1 commit intoapache:masterfrom
SteNicholas wants to merge 1 commit intoapache:masterfrom
Conversation
| partition_values = tuple(msg.partition) | ||
| if partition_values not in seen_partitions: | ||
| seen_partitions.add(partition_values) | ||
| equalities = [predicate_builder.equal(name, value) |
Contributor
There was a problem hiding this comment.
It seems that this does not handle NULL partition values correctly, could you add a case for null partition?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Support dynamic partition overwrite in
FileStoreCommit.overwrite(), aligned with JavaFileStoreCommitImpl.overwritePartition():dynamic-partition-overwrite=true(default), only partitions present in the committed data are replaced — other partitions remain untouched.dynamic-partition-overwrite=false, existing static overwrite behavior is unchanged.Key Changes:
DYNAMIC_PARTITION_OVERWRITEconfig option and accessor inCoreOptions.overwrite()withskip_overwrite/partition_filtercontrol flow mirroring Java'sskipOverwrite/partitionFilter._create_dynamic_partition_filter()mirroringPartitionPredicate.fromMultiple._create_static_partition_filter()mirroringcreatePartitionPredicate+fromPredicate.Close #7748.
Tests
Add
test_dynamic_partition_overwritetoReaderBasicTest,RESTTableReadWriteTest, andRESTAOReadWritePy36Test:test_overwrite(static mode withdynamic-partition-overwrite=false) passes without regression.