RussellSpitzer commented on code in PR #6517:
URL: https://github.com/apache/iceberg/pull/6517#discussion_r1061699038


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetMetricsRowGroupFilter.java:
##########
@@ -580,6 +608,10 @@ static boolean hasNonNullButNoMinMax(Statistics 
statistics, long valueCount) {
         && (statistics.getMaxBytes() == null || statistics.getMinBytes() == 
null);
   }
 
+  static boolean minMaxUndefined(Statistics statistics) {
+    return !statistics.isEmpty() && !statistics.hasNonNullValue();

Review Comment:
   I think that sounds good, I was basing this determination off of the code 
here from Statistics.java in Parquet
   ```java
     @Override
     public String toString() {
       if (this.hasNonNullValue()) {
         if (isNumNullsSet()) {
           return String.format("min: %s, max: %s, num_nulls: %d", 
minAsString(), maxAsString(), this.getNumNulls());
         } else {
           return String.format("min: %s, max: %s, num_nulls not defined", 
minAsString(), maxAsString());
         }
       } else if (!this.isEmpty())
         return String.format("num_nulls: %d, min/max not defined", 
this.getNumNulls());
       else
         return "no stats for this column";
     }
     ```
     Which similarly checks for the numNulls stat first



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