ConeyLiu commented on PR #4898: URL: https://github.com/apache/iceberg/pull/4898#issuecomment-1536947668
Thanks @szehon-ho @aokolnychyi > Will this mean all evaluator logic will have to change to be schema specific? Is there a simple example how this will be consumed? We don't need to change those existing evaluators. Just need to create a `SchemaEvaluator` by the filter expression and schema, and use it to evaluate the file by its schema.. You can refer [here](https://github.com/apache/iceberg/pull/4842/files#diff-79baa98562948784b4c255ee2dd14ae3a26f875d246f1607f76d58668285ef31R206): ```java return CloseableIterable.filter( open(projection(fileSchema, fileProjection, projectColumns, caseSensitive)), entry -> { boolean keep = entry != null; if (keep && schemaEvaluator != null && entry.file().schemaId() > -1) { // evaluate based on the schemaId keep = schemaEvaluator.eval(schemasById.get(entry.file().schemaId())); } return keep && evaluator.eval(entry.file().partition()) && metricsEvaluator.eval(entry.file()) && inPartitionSet(entry.file()); }); ``` -- 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]
