JingsongLi commented on code in PR #1478:
URL: https://github.com/apache/paimon-rust/pull/1478#discussion_r4661568549
##########
crates/paimon/src/table/global_index_scanner/evaluator.rs:
##########
@@ -378,6 +467,12 @@ impl GlobalIndexScanner {
}))
}
Predicate::Or(children) => {
+ if let Some(batched) = self.batched_or_btree_eq(children)?
{
Review Comment:
**[P2] Preserve metadata-only matches for single-key BTree shards (addressed
in `85f57b6`)**
In `15dec8c4`, batching the `Eq` predicates as `IN` bypassed the
metadata-only match for null-free shards that fully covered their row-ID ranges
and contained a single distinct key. Planning opened those index files and
decoded the full posting lists.
I reproduced this with two V1 BTree shards of 10,000 rows each and `(id = 7
AND value = 1) OR (id = 9 AND value = 2)`, where `value` is unindexed. The
candidate row ranges were identical. **Index file opens increased from 0 on the
merge base (`ab2eaef4`) to 2 on `15dec8c4`.**
The `IN` metadata check and regression test added in `85f57b6` address this
case.
--
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]