fix(mito2): schema-safe skipping index pruning#8122
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces logic to handle column type changes in bloom filter indexing by verifying type compatibility between region metadata and SST metadata. It adds an SstApplyPlan to manage predicates and ensures that indexes are only applied when types match, preventing issues after an ALTER TABLE operation. Review feedback suggests optimizing the SstApplyPlan by excluding columns that are entirely missing from the SST to improve cache key consistency and reduce unnecessary map entries.
| @@ -439,8 +448,31 @@ impl BloomFilterIndexApplier { | |||
| } | |||
|
|
|||
| /// Returns the predicate key. | |||
| if compatible_predicates.is_empty() { | ||
| return None; | ||
| } |
There was a problem hiding this comment.
We use a flag has_type_mismatch and reuse the plan in the inverted applier. Should we follow the same pattern?
greptimedb/src/mito2/src/sst/index/inverted_index/applier.rs
Lines 387 to 389 in f1ad472
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
#8074 but skipping index.
What's changed and what's your intention?
This pr mainly change
PR Checklist
Please convert it to a draft if some of the following conditions are not met.