-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Feature] Support for builtin inverted index #66541
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
base: main
Are you sure you want to change the base?
Conversation
🧪 CI InsightsHere's what we observed from your CI run for e3bf220. 🟢 All jobs passed!But CI Insights is watching 👀 |
|
@cursor review |
be/src/storage/index/inverted/builtin/builtin_inverted_index_iterator.cpp
Outdated
Show resolved
Hide resolved
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
|
@cursor review |
be/src/storage/index/inverted/builtin/builtin_inverted_index_iterator.cpp
Show resolved
Hide resolved
|
@cursor review |
8644f5c to
97d36e4
Compare
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
|
@cursor review |
be/src/storage/index/inverted/builtin/builtin_inverted_index_iterator.cpp
Outdated
Show resolved
Hide resolved
|
@cursor review |
1 similar comment
|
@cursor review |
be/src/storage/index/inverted/builtin/builtin_inverted_index_iterator.cpp
Show resolved
Hide resolved
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 19 / 19 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 383 / 420 (91.19%) file detail
|
|
@cursor review |
fe/fe-core/src/main/java/com/starrocks/server/OlapTableFactory.java
Outdated
Show resolved
Hide resolved
be/src/storage/index/inverted/builtin/builtin_inverted_index_iterator.cpp
Outdated
Show resolved
Hide resolved
| return st; | ||
| } | ||
|
|
||
| Status BuiltinInvertedIndexIterator::_equal_query(const Slice* search_query, roaring::Roaring* bit_map) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it’s tokenized at write time, can we still perform an equal query using bitmap index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equal query means match keyword. It always need MATCH predicate to trigger inverted index
| }; | ||
| Slice from_value = Slice(lower.second); | ||
| size_t search_size = upper.first - lower.first; | ||
| auto res = _bitmap_itr->seek_dictionary_by_predicate(predicate, from_value, search_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it’s tokenized at write time, is the like predicate on dictionary right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it performs like on dictionary
be/src/storage/index/inverted/builtin/builtin_inverted_index_iterator.cpp
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/sql/analyzer/IndexAnalyzer.java
Outdated
Show resolved
Hide resolved
|
This PR introduces builtin inverted index including the entire read and write logic. It builtin based on the bitmap index infrastructure. Signed-off-by: srlch <[email protected]>



What I'm doing:
This PR introduces builtin inverted index including the entire read and write logic. It builtin based on the bitmap index infrastructure.
Fixes #67167
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Adds a builtin inverted index implementation using bitmap index infrastructure with complete reader/writer/iterator and planner/runtime integration.
builtininverted index:BuiltinInvertedWriter/Reader/IndexIteratorandBuiltinPlugin; simple tokenizer for English; wired into CMakeColumnReader/Writer,Segment,SegmentIteratorupdated to load/use builtin inverted index viaIndexReadOptions; iterator close path added; new GIN metrics (GinFilter*) and profile countersadd_value_with_current_rowid,incre_rowid,finishoverload,seek_dictionary_by_predicate,next_batch_dictionary,read_union_bitmap(Buffer)) and minor size/memory optimizationsenable_prune_column_after_index_filterandenable_gin_filter; propagate to tablet reader paramsIMP_LIB=builtin, default to builtin in shared-data mode; restrict clucene in shared-data; refine replicated storage rule when GIN present; assign index id for CN tables (non-vector)BUILTIN_INVERTED_INDEXandBuiltinInvertedIndexPB; thriftTLakeScanNodegains enable flagsWritten by Cursor Bugbot for commit e3f10ad. This will update automatically on new commits. Configure here.