amogh-jahagirdar commented on code in PR #17035:
URL: https://github.com/apache/iceberg/pull/17035#discussion_r3509713285
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileStruct.java:
##########
@@ -121,16 +125,99 @@ void testFieldAccess() {
assertThat(file.fileSizeInBytes()).isEqualTo(512L);
assertThat(file.specId()).isEqualTo(1);
assertThat(file.sortOrderId()).isEqualTo(5);
- assertThat(file.deletionVector()).isSameAs(dv);
- assertThat(file.manifestInfo()).isSameAs(info);
+ assertThat(file.deletionVector()).isSameAs(DELETION_VECTOR);
+ assertThat(file.manifestInfo()).isSameAs(MANIFEST_INFO);
assertThat(file.keyMetadata()).isEqualTo(ByteBuffer.wrap(new byte[] {1, 2,
3}));
assertThat(file.splitOffsets()).containsExactly(100L, 200L);
assertThat(file.equalityIds()).containsExactly(1, 2, 3);
- // should return EMPTY_PARTITION_DATA
+ // partition defaults to EMPTY_PARTITION_DATA when not provided
assertThat(file.partition()).isNotNull();
assertThat(file.partition().size()).isEqualTo(0);
}
+ @Test
+ void testSetByPosition() {
+ Tracking tracking = TrackingBuilder.added(42L).build();
+ PartitionData partition = newPartition(7, "music");
+
+ TrackedFileStruct file = new TrackedFileStruct();
+ file.set(0, tracking);
+ file.set(1, FileContent.EQUALITY_DELETES.id());
Review Comment:
AI slop, dunno why it chose to use equality deletes for this...I'll fix it
up to be a realistic example
--
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]