rdblue commented on a change in pull request #1820:
URL: https://github.com/apache/iceberg/pull/1820#discussion_r536925001
##########
File path: core/src/test/java/org/apache/iceberg/TestManifestReaderStats.java
##########
@@ -149,19 +150,35 @@ private void assertFullStats(DataFile dataFile) {
Assert.assertNull(dataFile.columnSizes());
Assert.assertEquals(VALUE_COUNT, dataFile.valueCounts());
Assert.assertEquals(NULL_VALUE_COUNTS, dataFile.nullValueCounts());
+ Assert.assertEquals(NAN_VALUE_COUNTS, dataFile.nanValueCounts());
Assert.assertEquals(LOWER_BOUNDS, dataFile.lowerBounds());
Assert.assertEquals(UPPER_BOUNDS, dataFile.upperBounds());
- Assert.assertEquals(NAN_VALUE_COUNTS, dataFile.nanValueCounts());
+
+ Assert.assertEquals(FILE_PATH, dataFile.path()); // always select file
path in all test cases
}
private void assertStatsDropped(DataFile dataFile) {
- Assert.assertEquals(3, dataFile.recordCount()); // always select record
count in all test cases
+ Assert.assertEquals(3, dataFile.recordCount()); // record count is not
considered as droppable stats
Assert.assertNull(dataFile.columnSizes());
Assert.assertNull(dataFile.valueCounts());
Assert.assertNull(dataFile.nullValueCounts());
+ Assert.assertNull(dataFile.nanValueCounts());
Assert.assertNull(dataFile.lowerBounds());
Assert.assertNull(dataFile.upperBounds());
+
+ Assert.assertEquals(FILE_PATH, dataFile.path()); // always select file
path in all test cases
+ }
+
+ private void assertNoStats(DataFile dataFile) {
+ Assert.assertEquals(-1L, dataFile.recordCount());
Review comment:
I think this should always contain the record count, even after
`copyWithoutStats`. That's primarily to drop the stats maps, which can be
really large.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]