vector-store: allow syntax for local indexes#362
Open
ewienik wants to merge 7 commits intoscylladb:masterfrom
Open
vector-store: allow syntax for local indexes#362ewienik wants to merge 7 commits intoscylladb:masterfrom
ewienik wants to merge 7 commits intoscylladb:masterfrom
Conversation
Collaborator
Author
|
Changelog for 1fd0207
range diff |
15dcaa7 to
1fd0207
Compare
vector-store must support local indexes cql metadata for vector search. This commit adds DbIndexType enum to distinguish between global and local indexes. It will be needed in further PRs for implementing fully local indexes. The commit implements additional field for IndexMetadata: additional filtering columns. This field will be needed in future PR to retrieve data for these columns and allow filtering on their values. The commit parses index options target to distinguish between local or global indexes. Fixes: VECTOR-531
This commit updates integration tests setup_store with ability to set index type during integration tests.
For easier usage of KeyspaceName, TableName, ColumnName, IndexName this commit provides AsRef<str> for them.
In validator tests common functions for creating unique names used uuid. This commit uses atomic counters to provide shorter unique names, easier for investigating logs.
Validator needs common way to create different version of indexes - with/without specific options, with/without filtering columns. This commit introduces CreateIndexQuery struct to provide builder for such index - different optional parameters could be setup using piping methods. The commit refactors create_index to support CreateIndexQuery as a parameter.
To be able to support syntax for local index create the commit adds additional method and field to the CreateIndexQuery to support creating local primary key for an index.
The commit adds four tests in index_create testcase. Two for global indexes and two for local indexes, with or without additional filtering columns. The test constains index creation and simple query for the index. The query test for global index with filtering columns is disabled, because it is failing. SCYLLADB-635 bug is prepared to fix it.
Collaborator
Author
|
Changelog for 81bb2df
range diff |
1fd0207 to
81bb2df
Compare
knowack1
approved these changes
Feb 12, 2026
Collaborator
knowack1
left a comment
There was a problem hiding this comment.
Look great. Please check some of my nit thoughts/comments. I would consider unit tests for a new code in db.rs - the logic looks quite complex there.
| ck: Vec<String>, | ||
| } | ||
|
|
||
| fn from_target_option( |
Collaborator
There was a problem hiding this comment.
Would be nice to have unit tests for this logic.
Collaborator
Author
There was a problem hiding this comment.
It is impossible to unit test this as the function uses cql driver's Table struct which we cannot prepare manually (it needs working session with db)
| common::wait_for_index(client, &index).await; | ||
| } | ||
|
|
||
| // TODO: Re-enable this test after SCYLLADB-635 is solved. |
Collaborator
There was a problem hiding this comment.
I would be good to have an jira issue for this. Otherwise we will forget.
| .await; | ||
|
|
||
| info!("Wait for the index to be created"); | ||
| for client in &clients { |
Collaborator
There was a problem hiding this comment.
consider encapsulating this loop into a function - also in other places.
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.
ScylladDB currently supports syntax for creating local indexes. Vector-store needs to be able to read them and create local indexes using specified primary key. There will be several PRs to introduce full local indexes. This PR parses local indexes metadata and creates local indexes as global indexes.
The change introduces parsing and testing local indexes and refactoring of tests and types.
Fixes: vector-531