[core] Read primary-key vector results by position#8576
Merged
JingsongLi merged 3 commits intoJul 12, 2026
Conversation
leaves12138
approved these changes
Jul 12, 2026
leaves12138
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the latest commit (17ed7d8). The dedicated primary-key indexed read/provider cleanly isolates indexed reads from regular raw-read TopN/limit mapping state, while preserving predicate and deletion-vector filtering. I also verified physical-position/score propagation, multi-batch behavior, serialization compatibility, and the regular-read-then-indexed-read cache order. The focused 22-test suite and the additional cache-order regression passed on JDK 8. Looks good to me.
10 tasks
Open
8 tasks
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.
Summary
Adds the physical-row materialization path for primary-key vector search results. Bucket-local ANN and exact hits can now reuse
IndexedSplitfor distributed transport and be read from their source data files while preserving physical positions and scores.Changes
IndexedSplitcontract instead of introducing a vector-specific split: for primary-key raw reads, itsrowRangesare physical positions in exactly one data file and its optionalscoresfollow expanded range order.IndexedSplitranges use the coordinate system of their table read path: stable row IDs for Data Evolution and single-file physical positions for primary-key raw reads.PrimaryKeyIndexedSplitReadand provider to validate the single-file contract, expand ranges into physical positions, align optional scores, and route indexed primary-key reads.PrimaryKeyVectorPositionReader, which filters file batches by selected positions and exposes the physical position and score throughScoreRecordIterator.RawFileSplitReadindependent ofIndexedSplit: it only provides the lower-level single-file read for an already selected position bitmap, while the dedicated indexed reader owns indexed-split semantics.Testing
IndexedSplitserialization remains compatible.KeyValueTableReadroutesIndexedSplitthrough the dedicated primary-key indexed reader rather than the generic raw provider.Notes
IndexedSplitinstances from bucket search, cross-bucket Top-K, snapshot scan routing, and Flink source integration remain follow-up work.