marvinlanhenke commented on code in PR #241: URL: https://github.com/apache/iceberg-rust/pull/241#discussion_r1528671767
########## crates/iceberg/src/scan.rs: ########## @@ -159,6 +190,21 @@ impl TableScan { while let Some(entry) = entries.next().await { let manifest = entry.load_manifest(&file_io).await?; + // If this scan has a filter, check the partition evaluator cache for an existing + // PartitionEvaluator that matches this manifest's partition spec ID. + // Use one from the cache if there is one. If not, create one, put it in + // the cache, and take a reference to it. + if let Some(filter) = self.filter.as_ref() { + let partition_evaluator = partition_evaluator_cache + .entry(manifest.partition_spec_id()) + .or_insert_with_key(|key| self.create_partition_evaluator(key, filter)); + + // reject any manifest files whose partition values don't match the filter. + if !partition_evaluator.filter_manifest_file(&entry) { Review Comment: If I understood correctly; the `ManifestEval` is also applied here? I think this should be done before loading each manifest file by evaluating the `partitions: Vec<FieldSummary>` of `ManifestList`. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org