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


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetMetricsRowGroupFilter.java:
##########
@@ -60,6 +63,12 @@ public ParquetMetricsRowGroupFilter(Schema schema, 
Expression unbound, boolean c
     this.schema = schema;
     StructType struct = schema.asStruct();
     this.expr = Binder.bind(struct, Expressions.rewriteNot(unbound), 
caseSensitive);
+    this.initialDefaults = Maps.newHashMap();
+    for (Types.NestedField field : schema.columns()) {

Review Comment:
   `schema.columns()` walks only top-level fields. nested field will still have 
the same problem. Consider iterating all fields via 
`TypeUtil.indexById(struct)`. 
   
   I am also wondering if we should just call `schema.findField(id)`  inside 
`predicate()`. Since `findField(id)` internally uses `lazyIdToField()` with a 
cached map, it is unnecessary to keep another <id, initialDefault> here.



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