fix(fts): preserve exact top-level multimatch ties - #8702
Open
BubbleCal wants to merge 1 commit into
Open
Conversation
BubbleCal
force-pushed
the
yang/fts-top-level-cross-column-multimatch
branch
from
August 21, 2026 17:02
c581b76 to
10f53f1
Compare
BubbleCal
force-pushed
the
yang/fts-top-level-cross-column-multimatch
branch
from
August 21, 2026 17:21
10f53f1 to
3d27cf9
Compare
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
Both prior findings are fixed. The revised planner preserves each eligible field’s exact bounded top-k scorer, confines exhaustive fallback to ineligible fields, and the mixed partial-coverage result matches the exhaustive oracle.
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?
Top-level cross-column
MultiMatchpushes the globalkinto each field'sMatchchild. The leaf path truncates score ties before final row IDs are resolved, so the finalMAX(_score)aggregate and(score DESC, row_id ASC)sort can only reorder the wrong survivor set.On the 10M-row MMLB direct workload, current main mismatched the exhaustive oracle in 121 of 500 cases and produced unstable timed signatures for the same boundary-tie queries.
Linear: https://linear.app/lancedb/issue/OSS-1602
How does this PR fix the problem?
CompoundQueryExecper field.MAX(_score)aggregation.MultiMatchand fieldlessMatchexpansion.+0.0before field expansion so MAX aggregation and total-order sorting agree.The generic cross-column compound scorer was also prototyped for this root shape, but it paid row-address merge costs without a selective probe leaf. The field-local exact design was faster and keeps the final intermediate set bounded by
fields * k.Correctness validation
Environment: 10M-row MMLB dataset, two independently indexed text columns,
c4-highmem-16, 8 workers, 64 GiB index cache.k=10, 250 queriesk=100, 250 queriesThe target also had zero row/result signature instability across four timed processes.
This is primarily a correctness fix. Current main's higher throughput is not a valid performance baseline because its result set is incorrect on the affected queries.
Tests and checks
cargo check -p lance --testscargo fmt --all -- --checkgit diff --checkPer the requested workflow, I did not run local
cargo testorcargo clippy; CI will run them.