feat: Add vector search support to DataEvolutionBatchScan and rename topk to vector search#48
Merged
lszskye merged 7 commits intoalibaba:mainfrom Jan 7, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds vector similarity search support to the global index scanning infrastructure and renames all "topk" terminology to "vector_search" for better clarity and consistency.
Key changes:
- Introduces new
VectorSearchstruct to encapsulate vector similarity search parameters including field name, limit, query vector, pre-filter, and predicate - Updates
GlobalIndexEvaluatorto support both predicate filtering and vector search, with predicates serving as pre-filters for vector search - Renames classes and methods from
TopK/topktoVectorSearch/vector_searchthroughout the codebase
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
include/paimon/predicate/vector_search.h |
New header defining VectorSearch struct with field name, limit, query vector, pre-filter function, and optional predicate |
include/paimon/global_index/global_index_reader.h |
Renamed VisitTopK to VisitVectorSearch in the GlobalIndexReader interface |
include/paimon/global_index/global_index_result.h |
Renamed TopKGlobalIndexResult to VectorSearchGlobalIndexResult and updated related iterator classes |
include/paimon/global_index/bitmap_vector_search_global_index_result.h |
Renamed BitmapTopKGlobalIndexResult to BitmapVectorSearchGlobalIndexResult |
include/paimon/scan_context.h |
Added VectorSearch support to ScanFilter and ScanContextBuilder |
include/paimon/table/source/table_read.h |
Added documentation note about thread-safety of BatchReaders |
src/paimon/core/global_index/global_index_evaluator.h |
Updated Evaluate method to accept both predicate and vector_search parameters with documentation on their interaction |
src/paimon/core/global_index/global_index_evaluator_impl.h |
Added new methods for vector search evaluation and helper methods to get index readers |
src/paimon/core/global_index/global_index_evaluator_impl.cpp |
Implemented vector search evaluation logic including conversion of predicate results to pre-filters |
src/paimon/core/global_index/global_index_scan_impl.cpp |
Updated parallel scan to accept and process vector search parameters |
src/paimon/core/table/source/data_evolution_batch_scan.cpp |
Added vector search support to batch scanning with proper result handling |
src/paimon/core/operation/scan_context.cpp |
Implemented vector search getter/setter in ScanFilter and ScanContextBuilder |
src/paimon/global_index/lumina/lumina_global_index.cpp |
Updated lumina index reader to use VectorSearch struct instead of individual parameters |
src/paimon/common/global_index/bitmap_vector_search_global_index_result.cpp |
Implementation of renamed result class with vector search semantics |
test/inte/global_index_test.cpp |
Comprehensive test coverage for vector search functionality including new test TestDataEvolutionBatchScanWithVectorSearch |
| Multiple test files | Updated all test code to use new vector_search terminology and API |
Comments suppressed due to low confidence (1)
src/paimon/common/global_index/bitmap_vector_search_global_index_result.cpp:93
- The comment "current and other have has no intersection" contains a duplicate word "has". It should read "have no intersection" or "has no intersection".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lszskye
reviewed
Jan 7, 2026
lszskye
reviewed
Jan 7, 2026
zjw1111
reviewed
Jan 7, 2026
lszskye
approved these changes
Jan 7, 2026
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.
Purpose
Linked issue: #5
DataEvolutionBatchScanandGlobalIndexEvaluator.topktovector_search.Tests
GlobalIndexTest.TestDataEvolutionBatchScanWithVectorSearch
API and Format
Add
VectorSearchtoGlobalIndexEvaluatorandScanContext.