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


##########
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:
   Just addressed these, clear() now reset content of equialityFieldIds and 
some others that they were missing.



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