fix(fts): validate complete parameters across segments - #8050
Closed
BubbleCal wants to merge 2 commits into
Closed
Conversation
Validate complete persisted FTS parameters from scalar indexes that are already opened for execution. This preserves cross-segment custom stop-word checks without bypassing the index cache or adding query I/O.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the bug?
Segmented FTS query planning compared
InvertedIndexDetailsfrom each index manifest. That representation is intentionally lossy and omits tokenizer state such ascustom_stop_words, so segments with different persisted tokenizer configurations could be combined and queried with inconsistent semantics.What incorrect behavior does the bug cause?
A segmented index could silently collapse distinct states such as omitted custom stop words, an explicit empty list, and a non-empty replacement list. A first implementation fixed correctness by reading every segment's metadata before execution, but that bypassed the scalar-index cache and added two I/O operations to both cold and fully prewarmed queries.
How does this PR fix the problem?
InvertedIndexDetailsvalidation in planning for capability checks such as positions.InvertedIndexParamsfrom the opened indexes, includingcustom_stop_words.base_idbehavior through the public index-store path.Noneversus[],[]versus non-empty lists, legacy details, and shallow clones.Validation
cargo fmt --all -- --checkcargo clippy --all --tests --benches -- -D warningscargo test -p lance segment_params -- --nocapture(4 passed)cargo test -p lance canonicalize_inverted_details_accepts_legacy_empty_details -- --nocapture(1 passed)cargo test -p lance-index params_legacy -- --nocapture(2 passed)Coordination
This is the canonical latest-
mainfix. Sophon currently pins Lancev10.0.0-beta.5, so its parent PR uses the same patch backported onto that exact pin instead of upgrading the full Lance dependency set.