Closed sdd closed 2 months ago
@liurenjie1024 @Fokko @marvinlanhenke @ZENOTME PTAL, I've refactored this on top of the BoundPredicateVisitor
that was merged a few hours ago and it is ready for review
FAO @Fokko @marvinlanhenke @liurenjie1024: Comments addressed, ready for re-review
@marvinlanhenke I agree that rewrite-not should get applied. But it is not the responsibility of the InclusiveProjection
itself. In this design, it happens already earlier on on the process, at the point where the TableScan
gets built.
See here, in my other open PR: https://github.com/apache/iceberg-rust/pull/323/files#diff-bbfbe5e334be6c501ba2ca0ddd84d658ff0f3f84f2b5b532212f4e096a09e09bR76
This looks great!
I think @marvinlanhenke has a valid concern on when to apply the rewrite-not. Let's defer that discussion when we start wiring everything together. This look good, thanks @sdd for working on this and thanks @marvinlanhenke for the review 🙌
Thanks @sdd @Fokko ... I think its reasonable to defer the discussion, once we tie everything together.
This PR has been broken out of https://github.com/apache/iceberg-rust/pull/241 as it was getting too large.
The
InclusiveProjection
is used in the process of filtering manifest files in table scans. It projects theBoundPredicate
that is provided as the filter in a table scan into a Predicate that can be used for filtering the partition specs of manifests.This also updates
BoundPredicateVisitor
to add a parameter consisting of a reference to theBoundPredicate
itself to the unary/binary/set operation visitor methods, as a convenience. Without this, the implementation for theInclusiveProjection
visitor would be much more complex and consist of more boilerplate, as it would need to construct aBoundPredicate
itself in each method, in order to be able to pass a reference to aBoundPredicate
toPartitionField.transform.project