-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Merge conflicting deletion vectors #11693
base: main
Are you sure you want to change the base?
Core: Merge conflicting deletion vectors #11693
Conversation
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
Outdated
Show resolved
Hide resolved
558bee2
to
fb07a75
Compare
fb07a75
to
a8c5a59
Compare
* @param spec the data file partition spec | ||
* @param partition the data file partition | ||
*/ | ||
default void delete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also make this interface take in a List positions (kind of like a batch delete API on the writer) but it felt more natural to just pass in the index imo, cc @aokolnychyi @nastra thoughts?
public static Builder builderFor( | ||
TableOperations ops, PartitionSpec spec, FileFormat format, int partitionId, long taskId) { | ||
return new Builder(ops, spec, format, partitionId, taskId); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed a way to create an output file factory from table operations since that's all that exists in MergingSnapshotProducer
, this is public so we need to be careful.
This PR adds the ability to merge conflicting deletion vectors for a given data file instead of failing the commit. In parallel, every conflicting DV will be merged with the committed DV, and a new Puffin with the merged DV will be output per datafile which had conflicting DVs.
This PR also takes care of any tables that wrote multiple DVs for a given data file (which is not spec compliant) by opportunistically merging those as well