rdblue commented on a change in pull request #199:
URL: https://github.com/apache/iceberg/pull/199#discussion_r433562809



##########
File path: core/src/test/java/org/apache/iceberg/TestMetrics.java
##########
@@ -290,16 +310,18 @@ public void testMetricsForListAndMapElements() throws 
IOException {
 
     InputFile recordsFile = writeRecords(schema, record);
 
+    Long expectedNullCount = fileFormat() == FileFormat.ORC ? null : 0L;
     Metrics metrics = getMetrics(recordsFile);
     Assert.assertEquals(1L, (long) metrics.recordCount());
-    assertCounts(1, 1, 0, metrics);
+    assertCounts(1, 1L, expectedNullCount, metrics);
     assertBounds(1, IntegerType.get(), null, null, metrics);
-    assertCounts(2, 1, 0, metrics);
+    assertCounts(2, 1L, expectedNullCount, metrics);
     assertBounds(2, StringType.get(), null, null, metrics);
-    assertCounts(4, 3, 0, metrics);
+    assertCounts(4, 3L, expectedNullCount, metrics);

Review comment:
       The Iceberg spec requires the count to be null and non-null values, so 
if the null count is not known then the value count cannot be known and should 
be null.




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

Reply via email to