shardulm94 commented on a change in pull request #1566:
URL: https://github.com/apache/iceberg/pull/1566#discussion_r505911443



##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java
##########
@@ -582,6 +582,13 @@ public ReadBuilder withNameMapping(NameMapping 
newNameMapping) {
           optionsBuilder = ParquetReadOptions.builder();
         }
 
+        if (filter != null &&
+                schema.getAliases() != null &&
+                ParquetFilters.isSupportedFilter(filter, schema, 
caseSensitive)) {
+          optionsBuilder.useRecordFilter(filterRecords);
+          optionsBuilder.withRecordFilter(ParquetFilters.convert(schema, 
filter, caseSensitive));

Review comment:
       We don't have to move it to the absolute top, we can only fetch the file 
schema if the filter is supposed to be used. It will lead to an extra open 
call, but I am not sure I see a good way around it. 




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