Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Fix bugs of vector index #55123

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ZiheLiu
Copy link
Contributor

@ZiheLiu ZiheLiu commented Jan 16, 2025

Why I'm doing:

Fix bugs of vector index.

What I'm doing:

Fixes #55009
Fixes #55011
Fixes #55010
Fixes #55055

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

Signed-off-by: zihe.liu <[email protected]>
@ZiheLiu ZiheLiu force-pushed the fix/main/index_vector branch from a17ffed to 20c5b68 Compare January 16, 2025 04:16
Signed-off-by: zihe.liu <[email protected]>
Signed-off-by: zihe.liu <[email protected]>
Signed-off-by: zihe.liu <[email protected]>
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 289 / 329 (87.84%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/common/VectorSearchOptions.java 14 24 58.33% [83, 84, 85, 86, 87, 88, 89, 90, 91, 92]
🔵 com/starrocks/common/VectorIndexParams.java 42 59 71.19% [191, 192, 203, 204, 218, 219, 228, 229, 256, 257, 258, 260, 261, 263, 264, 265, 266]
🔵 com/starrocks/planner/OlapScanNode.java 4 5 80.00% [1106]
🔵 com/starrocks/alter/SchemaChangeHandler.java 14 15 93.33% [2083]
🔵 com/starrocks/sql/optimizer/rule/transformation/RewriteToVectorPlanRule.java 156 166 93.98% [78, 258, 271, 272, 323, 344, 372, 376, 382, 387]
🔵 com/starrocks/analysis/VectorIndexUtil.java 21 22 95.45% [50]
🔵 com/starrocks/qe/SessionVariable.java 7 7 100.00% []
🔵 com/starrocks/sql/analyzer/SetStmtAnalyzer.java 12 12 100.00% []
🔵 com/starrocks/sql/analyzer/CreateTableAnalyzer.java 9 9 100.00% []
🔵 com/starrocks/sql/StatementPlanner.java 3 3 100.00% []
🔵 com/starrocks/catalog/IndexParams.java 7 7 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 68 / 72 (94.44%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/storage/index/vector/vector_index_builder.h 1 2 50.00% [49]
🔵 be/src/exec/pipeline/scan/olap_chunk_source.cpp 7 8 87.50% [560]
🔵 be/src/storage/index/vector/tenann/tenann_index_builder.cpp 37 39 94.87% [42, 47]
🔵 be/src/storage/index/vector/tenann/tenann_index_builder.h 1 1 100.00% []
🔵 be/src/storage/index/vector/vector_index_builder_factory.cpp 1 1 100.00% []
🔵 be/src/storage/index/vector/vector_index_writer.h 3 3 100.00% []
🔵 be/src/storage/index/vector/vector_index_writer.cpp 10 10 100.00% []
🔵 be/src/storage/index/vector/tenann/del_id_filter.h 1 1 100.00% []
🔵 be/src/storage/rowset/segment_iterator.cpp 2 2 100.00% []
🔵 be/src/storage/index/vector/tenann/tenann_index_utils.cpp 3 3 100.00% []
🔵 be/src/storage/rowset/array_column_writer.cpp 2 2 100.00% []

if (_use_vector_index && !_use_ivfpq) {
index = _tablet_schema->field_index(slot->col_name(), _vector_distance_column_name);
if (_use_vector_index && !_use_ivfpq && slot->id() == _vector_slot_id) {
index = _tablet_schema->num_columns();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possiable have more than one vector index slot id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants