JunRuiLee commented on code in PR #448:
URL: https://github.com/apache/paimon-rust/pull/448#discussion_r3526265480
##########
crates/paimon/src/table/read_builder.rs:
##########
@@ -233,10 +232,13 @@ impl<'a> ReadBuilder<'a> {
Some(projected) => self.resolve_projected_fields(projected)?,
};
+ // Pass the FULL data predicate through (including `And`/`Or`/`Not`).
+ // Pushdown/stats skip compound nodes; the residual pass enforces the
full
+ // predicate exactly. Pruning here would drop compound predicates.
Ok(TableRead::new(
self.table,
read_type,
- reader_pruning_predicates(self.filter.data_predicates.clone()),
+ self.filter.data_predicates.clone(),
Review Comment:
Fixed. `TableRead::read_with_evolution` now passes the data predicates into
`DataEvolutionReader`, which filters every batch exactly on both branches
(raw-convertible and column-merge): the read set is widened with predicate
columns, `_ROW_ID` is attached first, then the residual filter runs and the
batch is projected back to the caller's read type. Inner file readers still
receive no predicates, so the two branches stay consistent.
Tests go through the real `ReadBuilder` -> `to_arrow` path: leaf and `Or`
predicates, cross-file predicate on the merge branch, `_ROW_ID` + predicate
(original ids survive), and null-fill semantics (comparisons drop, `IS NULL`
keeps).
--
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]