gaborkaszab commented on code in PR #17133:
URL: https://github.com/apache/iceberg/pull/17133#discussion_r3551747307


##########
core/src/test/java/org/apache/iceberg/TestTrackedFileStruct.java:
##########
@@ -240,12 +231,9 @@ void copy() {
     assertThat(copy.keyMetadata()).isEqualTo(ByteBuffer.wrap(new byte[] {1, 2, 
3}));
     assertThat(copy.splitOffsets()).containsExactly(100L, 200L);
     assertThat(copy.equalityIds()).containsExactly(1, 2, 3);
-
-    assertThat(PARTITION_COMPARATOR.compare(copy.partition(), 
PARTITION)).isEqualTo(0);
+    assertThat(copy.partition()).isSameAs(PARTITION_COPY);
 
     // mutable fields are deep-copied, not shared with the original
-    assertThat(copy.tracking()).isNotSameAs(file.tracking());
-    assertThat(copy.partition()).isNotSameAs(file.partition());
     assertThat(copy.deletionVector()).isNotSameAs(file.deletionVector());

Review Comment:
   `DeletionVector` and `ManifestInfo` both have their `copy()` function. See 
[here](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java#L83)
 and 
[here](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java#L159).
   
   `keyMetadata` is a byte array not a class, we won't be able to do so for 
this, but for the other 2 members we could.



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