feat: create vector indices without training#7211
Open
burlacio wants to merge 1 commit into
Open
Conversation
Contributor
|
ACTION NEEDED The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
d8d015e to
2dd9759
Compare
b566eee to
5b28af9
Compare
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.
Summary
Enable
create_index(..., train=False)for vector indices,completing the empty-index story that already worked for
scalar/FTS indices.
Previously this path hit
todo!("create empty vector index when train=false")and panicked.The work touches three things:
rust/lance/src/index/create.rs— removes thetodo!()and lets the existing
build_empty_vector_indexhelper handlethe train=false branch.
rust/lance/src/index.rs— empty (definition-only) indiceshave no on-disk files, so the stats and vector-detection paths
needed adjustments:
collect_regular_indices_statisticsnow short-circuits whenfragment_bitmapis empty and returns{}instead of trying toopen a non-existent index file.
is_vector_indexdetection prefersindex_detailsmetadataover file-based probing, since empty indices have no
INDEX_FILE_NAMEto inspect. The file-based path is kept as afallback for older indices.