-
Notifications
You must be signed in to change notification settings - Fork 3k
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
support skip-index based on chunk-metrics to accelerate expr filter(#27925) #28297
support skip-index based on chunk-metrics to accelerate expr filter(#27925) #28297
Conversation
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.
need review for interface design and basic functions has been testified correctly on my local macOS
@@ -307,4 +313,44 @@ ScalarIndexSort<T>::Reverse_Lookup(size_t idx) const { | |||
auto offset = idx_to_offsets_[idx]; | |||
return data_[offset].a_; | |||
} | |||
|
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.
aggregate unary and binary judgment into one function
@@ -293,11 +302,18 @@ ExecExprVisitor::ExecRangeVisitorImpl(FieldId field_id, | |||
"[ExecExprVisitor]Data size not equal to size_per_chunk"); | |||
results.emplace_back(std::move(data)); | |||
} | |||
|
|||
for (auto chunk_id = indexing_barrier; chunk_id < num_chunk; ++chunk_id) { | |||
auto this_size = chunk_id == num_chunk - 1 | |||
? row_count_ - chunk_id * size_per_chunk | |||
: size_per_chunk; |
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.
use skip Index here when executing expr
@@ -293,4 +293,19 @@ SegmentInternalInterface::timestamp_filter(BitsetType& bitset, | |||
} | |||
} |
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.
at present, SkipIndex is a segment-level component, and relating load is also triggered by segment
skipIndex_.Load(field_id, chunk_id, data_type, chunk_data, count); | ||
} | ||
|
||
|
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.
maybe we need a returned value to indicate whether successful or not for loading skipIndex
|
||
FieldChunkMetrics() : hasValue_(false){}; | ||
}; | ||
|
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.
SkipIndex is a separate class and can be extended for using fieldChunkMetrics in various ways.
@@ -1381,3 +1381,98 @@ TEST(Sealed, LoadArrayFieldDataWithMMap) { | |||
SealedLoadFieldData(dataset, *segment, {}, true); | |||
segment->Search(plan.get(), ph_group.get()); | |||
} | |||
|
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.
old ut, I ' m changing now
@MrPresent-Han E2e jenkins job failed, comment |
@MrPresent-Han ut workflow job failed, comment |
91f064b
to
4884e45
Compare
@MrPresent-Han E2e jenkins job failed, comment |
@MrPresent-Han ut workflow job failed, comment |
569dca0
to
47fb9fa
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #28297 +/- ##
==========================================
+ Coverage 81.79% 81.89% +0.09%
==========================================
Files 847 839 -8
Lines 119750 120076 +326
==========================================
+ Hits 97950 98336 +386
+ Misses 18542 18478 -64
- Partials 3258 3262 +4
|
47fb9fa
to
5aa0086
Compare
@MrPresent-Han E2e jenkins job failed, comment |
@MrPresent-Han ut workflow job failed, comment |
5aa0086
to
aa61c0f
Compare
@MrPresent-Han ut workflow job failed, comment |
aa61c0f
to
cc8924b
Compare
@MrPresent-Han E2e jenkins job failed, comment |
cc8924b
to
6481542
Compare
@MrPresent-Han ut workflow job failed, comment |
6481542
to
92a0270
Compare
@MrPresent-Han ut workflow job failed, comment |
rerun ut |
@@ -1641,8 +1749,11 @@ ExecExprVisitor::visit(UnaryRangeExpr& expr) { | |||
} | |||
case DataType::VARCHAR: { | |||
if (segment_.type() == SegmentType::Growing) { | |||
std::cout << "hc===execute unary range: string" << std::endl; |
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.
cleanup it
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.
changed
92a0270
to
842396d
Compare
@MrPresent-Han E2e jenkins job failed, comment |
842396d
to
81e8312
Compare
rerun ut |
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.
skip for term expr would come later?
emm, I forget this, good catch |
81e8312
to
bffca94
Compare
bffca94
to
1a11a06
Compare
…ilvus-io#27925) Signed-off-by: MrPresent-Han <[email protected]>
1a11a06
to
f0e3aff
Compare
changed |
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.
support skip term, need review
@@ -2522,9 +2633,19 @@ ExecExprVisitor::ExecTermVisitorImplTemplate<bool>(TermExpr& expr_raw) | |||
// return std::binary_search(terms.begin(), terms.end(), x); | |||
return term_set.find(x) != term_set.end(); | |||
}; | |||
auto skip_index_func = |
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.
changed, support term @yah01
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jiaoew1991, MrPresent-Han The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
related: #27925