XiaoHongbo-Hope opened a new pull request, #1542:
URL: https://github.com/apache/paimon-rust/pull/1542

   ### Purpose
   
   Linked issue: close #1541
   
   A rectangular OR predicate repeats the same indexed `IN` condition for each 
equality arm, causing redundant BTree opens during global index planning. 
Coalesce those arms before composite index planning while preserving the exact 
predicate semantics.
   
   ### Brief change log
   
   - Rewrite `(a = x AND b IN S) OR (a = y AND b IN S)` to `a IN (x, y) AND b 
IN S` only when every arm has the same `b IN S` predicate and the equality 
column metadata matches.
   - Apply the rewrite to direct OR predicates and OR children of an AND before 
composite index planning.
   - Leave uneven or sparse locator sets unchanged.
   
   ### Tests
   
   - `cargo fmt --all -- --check`
   - `cargo test -p paimon --lib 
test_coalesce_equal_or_arms_only_for_identical_other_predicate --quiet` (1 
passed on current upstream `main`)
   - One-shot application validation on a pinned snapshot with 14 × 123 
complete locators: Steps planning 6.193 → 0.316 s, full `get_steps` 6.883 → 
1.019 s, BTree opens 1,722 → 239. All 1,722 rows had the same content digest 
before and after.
   - Sparse control with one locator removed: planning 6.213 → 6.259 s, BTree 
opens 1,722 in both builds, and all 1,721 rows had the same content digest.
   
   These numbers measure one `get_steps` call, not DataLoader throughput. The 
application cache was disabled and the OS cache was not flushed.
   
   ### API and Format
   
   No public API or storage format change.
   
   ### Documentation
   
   No user-facing documentation change.
   


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