Fokko commented on code in PR #17321:
URL: https://github.com/apache/iceberg/pull/17321#discussion_r3641772062


##########
parquet/src/test/java/org/apache/iceberg/parquet/TestParquet.java:
##########
@@ -169,9 +170,13 @@ public void 
testMetricsMissingColumnStatisticsInRowGroups() throws IOException {
     // Null count, lower and upper bounds should be empty because
     // one of the statistics in row groups is missing
     Metrics metrics = ParquetUtil.fileMetrics(inputFile, 
MetricsConfig.getDefault());
-    assertThat(metrics.nullValueCounts()).isEmpty();
-    assertThat(metrics.lowerBounds()).isEmpty();
-    assertThat(metrics.upperBounds()).isEmpty();
+    assertThat(metrics.nullValueCounts()).hasSize(1);
+
+    assertThat(metrics.lowerBounds()).hasSize(1);
+    
assertThat(metrics.lowerBounds().get(1)).isEqualTo(Conversions.toByteBuffer(Types.StringType.get(),
 "test"));
+
+    assertThat(metrics.upperBounds()).hasSize(1);
+    
assertThat(metrics.upperBounds().get(1)).isEqualTo(Conversions.toByteBuffer(Types.StringType.get(),
 "test"));

Review Comment:
   I think I feel a bit uncomfortable with the change introduced in 
https://github.com/apache/parquet-java/pull/3575. I don't think the upper- and 
lower bounds are correct, since the value for the long string is truncated, and 
it should be part of the stats (or completely omit it like before).



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

Reply via email to