stevenzwu commented on code in PR #17035:
URL: https://github.com/apache/iceberg/pull/17035#discussion_r3510455831
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileStruct.java:
##########
@@ -317,14 +477,43 @@ void testContentStatsNullWhenNotSet() {
void testAllFileContentTypesSupported() {
for (FileContent content : FileContent.values()) {
TrackedFileStruct file = new TrackedFileStruct();
- file.set(CONTENT_TYPE_ORDINAL, content.id());
+ file.set(1, content.id());
assertThat(file.contentType()).isEqualTo(content);
}
}
@Test
void testJavaSerializationRoundTrip() throws IOException,
ClassNotFoundException {
- TrackedFileStruct file = createFullTrackedFile();
+ TrackingStruct tracking =
+ new TrackingStruct(
+ EntryStatus.ADDED,
+ 42L,
+ null,
Review Comment:
nit: since we set manifest location and position, it is for the read path of
committed entry. we probably should populate the seq numbers and first row id.
since we are testing serialization round-trip, we might just fill in and assert
all applicable fields. so together, I am thinking about these fields.
```
Long dataSequenceNumber,
Long fileSequenceNumber,
Long dvSnapshotId,
Long firstRowId,
byte[] deletedPositions,
byte[] replacedPositions
```
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileStruct.java:
##########
@@ -348,7 +537,36 @@ void testJavaSerializationRoundTrip() throws IOException,
ClassNotFoundException
@Test
void testKryoSerializationRoundTrip() throws IOException {
Review Comment:
maybe this can be merged with the previous serdes test and use a
parameterized function arg.
```
TestHelpers.roundTripSerialize
TestHelpers.KryoHelpers.roundTripSerialize
```
--
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]