XiaoHongbo-Hope opened a new issue, #1541: URL: https://github.com/apache/paimon-rust/issues/1541
### Problem The global index scanner plans an OR of conjunctive locator predicates one arm at a time. For a rectangular set of `(episode, step)` locators, each arm repeats the same `step IN (...)` condition while only the `episode = ...` value changes. This causes repeated BTree opens during planning. ### Proposed change When every OR arm has the same second `IN` predicate and differs only by equality on the same first column, rewrite the OR into a single conjunction with an `IN` predicate for the first column. Apply this before composite index planning. Keep non-rectangular and sparse predicates unchanged. ### Validation target Check output parity for both rectangular and sparse locator sets, and measure planning time and BTree opens. A one-shot 14 × 123 locator query in our test data reduced Steps planning from 6.193 s to 0.316 s and BTree opens from 1,722 to 239; sparse control had unchanged BTree opens and identical returned rows. -- 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]
