pvary commented on code in PR #16692:
URL: https://github.com/apache/iceberg/pull/16692#discussion_r3557372837


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetMetricsRowGroupFilter.java:
##########
@@ -128,6 +130,22 @@ public Boolean or(Boolean leftResult, Boolean rightResult) 
{
       return leftResult || rightResult;
     }
 
+    @Override
+    @SuppressWarnings("unchecked")
+    public <T> Boolean predicate(BoundPredicate<T> pred) {
+      // a column absent from the file reads as its initial-default, so 
evaluate the predicate
+      // against that default
+      if (pred.term() instanceof BoundReference) {
+        int id = ((BoundReference<T>) pred.term()).fieldId();
+        Types.NestedField field = schema.findField(id);
+        if (field != null && field.initialDefault() != null && 
!valueCounts.containsKey(id)) {
+          return pred.test((T) field.initialDefault()) ? ROWS_MIGHT_MATCH : 
ROWS_CANNOT_MATCH;
+        }

Review Comment:
   How is this behaves with structs and defaults for structs?



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