This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new be5d11e0ec [fix](inverted index) check all pushdown for match
predicate (#22836)
be5d11e0ec is described below
commit be5d11e0ec2df9c223910ac8b7efc1cfd29355d6
Author: airborne12 <[email protected]>
AuthorDate: Fri Aug 11 09:02:15 2023 +0800
[fix](inverted index) check all pushdown for match predicate (#22836)
---
be/src/olap/rowset/segment_v2/segment_iterator.cpp | 10 ++++++----
be/src/olap/rowset/segment_v2/segment_iterator.h | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index 4a7fa41ba3..f1c5b15bce 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -768,7 +768,8 @@ Status
SegmentIterator::_apply_index_except_leafnode_of_andnode() {
for (auto pred : _col_preds_except_leafnode_of_andnode) {
auto column_name = _schema->column(pred->column_id())->name();
if (!_remaining_conjunct_roots.empty() &&
- _check_column_pred_all_push_down(column_name, true) &&
+ _check_column_pred_all_push_down(column_name, true,
+ pred->type() ==
PredicateType::MATCH) &&
!pred->predicate_params()->marked_by_runtime_filter) {
int32_t unique_id = _schema->unique_id(pred->column_id());
_need_read_data_indices[unique_id] = false;
@@ -887,7 +888,8 @@ Status
SegmentIterator::_apply_inverted_index_on_column_predicate(
}
auto column_name = _schema->column(pred->column_id())->name();
- if (_check_column_pred_all_push_down(column_name) &&
+ if (_check_column_pred_all_push_down(column_name, false,
+ pred->type() ==
PredicateType::MATCH) &&
!pred->predicate_params()->marked_by_runtime_filter) {
_need_read_data_indices[unique_id] = false;
}
@@ -2164,12 +2166,12 @@ Status
SegmentIterator::current_block_row_locations(std::vector<RowLocation>* bl
* call _check_column_pred_all_push_down will return false.
*/
bool SegmentIterator::_check_column_pred_all_push_down(const std::string&
column_name,
- bool in_compound) {
+ bool in_compound, bool
is_match) {
if (_remaining_conjunct_roots.empty()) {
return true;
}
- if (in_compound) {
+ if (in_compound || is_match) {
auto preds_in_remaining_vconjuct =
_column_pred_in_remaining_vconjunct[column_name];
for (auto pred_info : preds_in_remaining_vconjuct) {
auto column_sign = _gen_predicate_result_sign(&pred_info);
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.h
b/be/src/olap/rowset/segment_v2/segment_iterator.h
index 93b8b398e7..a25cf1b5bf 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.h
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.h
@@ -269,7 +269,8 @@ private:
size_t num_of_defaults);
// return true means one column's predicates all pushed down
- bool _check_column_pred_all_push_down(const std::string& column_name, bool
in_compound = false);
+ bool _check_column_pred_all_push_down(const std::string& column_name, bool
in_compound = false,
+ bool is_match = false);
void _calculate_pred_in_remaining_conjunct_root(const
vectorized::VExprSPtr& expr);
// todo(wb) remove this method after RowCursor is removed
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]