NoahKusaba commented on PR #117: URL: https://github.com/apache/datafusion-iceberg/pull/117#issuecomment-7051282357
> I think it might also be worth considering replacing the `Expr -> iceberg::Predicate` converter with a `PhysicalExpr -> iceberg::Predicate` one and converting `Expr` -> `PhysicalExpr` during planning. We definitely need the physical converter because dynamic filters are only available during execution as `Vec<Arc<dyn PhysicalExpr>>`, and having a central place for this logic would help avoid drift and inconsistent behaviour. > > DF's `ListingTable` already does [this conversion](https://github.com/apache/datafusion/blob/d5552342012888b7d1a3ab88d92e3d292fc0cde0/datafusion/catalog-listing/src/helpers.rs#L330-L337) when it prunes files by partition value. I'll create an issue to discuss this further, because it needs to work well with both eager and lazy file planning. > > As an aside, there are pre-existing correctness issues that the logical converter could run into because of `iceberg-rust` issues like [apache/iceberg-rust#3482](https://github.com/apache/iceberg-rust/issues/3482) and [apache/iceberg-rust#3626](https://github.com/apache/iceberg-rust/issues/3626) (and possibly more). > > We _could_ choose not to convert these cases into predicates, but I'm not sure if that should happen here or if we should just wait for the fixes from iceberg-rust. These are all great follow-ups, and I appreciate you pointing them out. For the time being this PR maintains existing behavior, and is just for cleaning up existing code and adding extra test coverage. There needs to be more work to come to get it production ready :smiling_face_with_tear: -- 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]
