nastra commented on code in PR #18631:
URL: https://github.com/apache/iceberg/pull/18631#discussion_r4442945779


##########
core/src/main/java/org/apache/iceberg/FileMetadata.java:
##########
@@ -91,13 +92,25 @@ public void clear() {
       this.sortOrderId = null;
     }
 
+    /**
+     * Copies all fields from an existing delete file, including its content 
type and equality field
+     * IDs.
+     *
+     * <p>The content type and equality field IDs always come from {@code 
toCopy}, so anything set
+     * earlier with {@link #ofPositionDeletes()} or {@link 
#ofEqualityDeletes(int...)} is replaced.
+     * To change them on the copy, call those methods after this one.
+     */
     public Builder copy(DeleteFile toCopy) {
       if (isPartitioned) {
         Preconditions.checkState(
             specId == toCopy.specId(), "Cannot copy a DeleteFile with a 
different spec");
         this.partitionData = DataFiles.copyPartitionData(spec, 
toCopy.partition(), partitionData);
       }
       this.content = toCopy.content();
+      this.equalityFieldIds =

Review Comment:
   can we also set equalityFieldIds to null in `clear()`? I think we're also 
missing clearing a few more variables there



-- 
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