stevenzwu commented on code in PR #16964:
URL: https://github.com/apache/iceberg/pull/16964#discussion_r3479124285


##########
core/src/main/java/org/apache/iceberg/TrackedFileBuilder.java:
##########
@@ -238,21 +229,28 @@ TrackedFileBuilder deletionVector(DeletionVector 
newDeletionVector) {
     Preconditions.checkArgument(newDeletionVector != null, "Invalid deletion 
vector: null");
     Preconditions.checkArgument(
         contentType == FileContent.DATA,
-        "Deletion vector can only be added to DATA entries, but entry type is: 
%s",
+        "Cannot add deletion vector for file with content: %s",
         contentType);
     Preconditions.checkArgument(
-        this.deletionVector == null || 
!this.deletionVector.equals(newDeletionVector),
-        "The same deletion vector already added");
+        deletionVector == null || deletionVector.cardinality() < 
newDeletionVector.cardinality(),

Review Comment:
   this is a very interesting scenario, like Puffin file compaction. It may not 
be useful to compact DV Puffin files due to the access pattern to DV blobs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to