rdblue commented on code in PR #16936:
URL: https://github.com/apache/iceberg/pull/16936#discussion_r4223398426
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileAdapters.java:
##########
@@ -114,17 +132,57 @@ class TestTrackedFileAdapters {
.addedFilesCount(3)
.existingFilesCount(5)
.deletedFilesCount(2)
- .replacedFilesCount(0)
- .modifiedFilesCount(0)
+ .replacedFilesCount(4)
+ .modifiedFilesCount(1)
.addedRowsCount(300L)
.existingRowsCount(500L)
.deletedRowsCount(200L)
- .replacedRowsCount(0L)
- .modifiedRowsCount(0L)
+ .replacedRowsCount(40L)
+ .modifiedRowsCount(10L)
.minSequenceNumber(7L)
.dv(ByteBuffer.wrap(MumblingTestUtil.onlyFirstBitSetBytes()))
.build();
+ private static final Metrics METRICS_WITH_BOUNDS =
+ new Metrics(
+ 100L,
+ ImmutableMap.of(1, 16L, 2, 64L),
+ ImmutableMap.of(1, 100L, 2, 100L),
+ ImmutableMap.of(1, 0L, 2, 5L),
+ ImmutableMap.of(),
+ ImmutableMap.of(1, Conversions.toByteBuffer(Types.IntegerType.get(),
1)),
+ ImmutableMap.of(1, Conversions.toByteBuffer(Types.IntegerType.get(),
1000)));
+
+ private static final DataFile DATA_FILE =
+ new GenericDataFile(
+ UNPARTITIONED_SPEC.specId(),
+ DATA_FILE_LOCATION,
+ FileFormat.PARQUET,
+ PartitionData.EMPTY,
+ 1024L,
+ new Metrics(100L),
+ KEY_METADATA,
+ ImmutableList.of(0L),
+ SORT_ORDER_ID,
+ FIRST_ROW_ID);
+ private static final DataFile DATA_FILE_WITH_METRICS =
+ new GenericDataFile(
+ UNPARTITIONED_SPEC.specId(),
+ DATA_FILE_LOCATION,
+ FileFormat.PARQUET,
+ PartitionData.EMPTY,
+ 1024L,
+ METRICS_WITH_BOUNDS,
+ null,
Review Comment:
Why use different constants? Does this change matter to the tests?
--
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]