JunRuiLee opened a new pull request, #425:
URL: https://github.com/apache/paimon-rust/pull/425

   ### Purpose
   
   Java Paimon's `LeafFunction` set includes `StartsWith` / `EndsWith` / 
`Contains` / `Like` and `Between`, but `paimon-rust` only has the basic 
comparison/null/set operators. So a DataFusion filter like `col LIKE 'x%'` or 
`col BETWEEN a AND b` can't be translated and degrades to a full scan + 
residual instead of pushing down. This PR adds those operators and wires them 
end-to-end (builder, eval, stats prune, Parquet row filter, b-tree index, 
DataFusion translation).
   
   ### Brief change log
   
   3 commits (recommend per-commit review; later build on earlier):
   
   1. **StartsWith / EndsWith / Contains** — empty pattern folds to 
`IsNotNull`; Vortex/ORC/b-tree fall open. Adds `arrow-string`.
   2. **Like + LikeOptimization** — rewrites 
`prefix%`/`%suffix`/`%mid%`/no-wildcard into the string ops or `Eq`, else a 
residual `Like` leaf matched with arrow's like-kernel escape semantics. Only 
`\` escape; `ILIKE`/`NOT LIKE` fall open.
   3. **Between / NotBetween** — `GtEq+LtEq` overlap semantics; `NotBetween` 
pushes down safely (NULL never matches, data ranges stay `Inexact`). Also fixes 
the b-tree global index keeping a file when a `Between` conjunct misses but a 
co-conjunct matches. Adds `arrow-arith`.
   
   ### Tests
   
   New unit/translation tests across `predicate.rs`, `predicate_stats.rs`, 
`parquet.rs`, `filter_pushdown.rs` (incl. `NOT BETWEEN`) and a 
`global_index_scanner` regression test. `cargo test -p paimon --lib --features 
vortex` and `-p paimon-datafusion --lib filter_pushdown` pass.
   
   ### API and Format
   
   Adds `PredicateOperator` variants + builder methods 
(`starts_with`/`ends_with`/`contains`/`like`/`between`/`not_between`). No 
format change. New deps: `arrow-string`, `arrow-arith` (58.0).
   
   ### Documentation
   
   Covered by rustdoc on the new builder methods.
   


-- 
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]

Reply via email to