Skip to content

Commit

Permalink
[fix](index) rollback in comopund index opt (apache#37742)
Browse files Browse the repository at this point in the history
## Proposed changes

rollback opt in apache#34134
  • Loading branch information
xiaokang authored Jul 13, 2024
1 parent 99c601d commit d728555
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions be/src/olap/rowset/segment_v2/segment_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,16 +814,9 @@ Status SegmentIterator::_execute_predicates_except_leafnode_of_andnode(
} else if (_is_literal_node(node_type)) {
auto v_literal_expr = std::dynamic_pointer_cast<doris::vectorized::VLiteral>(expr);
_column_predicate_info->query_values.insert(v_literal_expr->value());
} else if (node_type == TExprNodeType::BINARY_PRED || node_type == TExprNodeType::MATCH_PRED ||
node_type == TExprNodeType::IN_PRED) {
} else if (node_type == TExprNodeType::BINARY_PRED || node_type == TExprNodeType::MATCH_PRED) {
if (node_type == TExprNodeType::MATCH_PRED) {
_column_predicate_info->query_op = "match";
} else if (node_type == TExprNodeType::IN_PRED) {
if (expr->op() == TExprOpcode::type::FILTER_IN) {
_column_predicate_info->query_op = "in";
} else {
_column_predicate_info->query_op = "not_in";
}
} else {
_column_predicate_info->query_op = expr->fn().name.function_name;
}
Expand Down Expand Up @@ -961,9 +954,7 @@ Status SegmentIterator::_apply_index_except_leafnode_of_andnode() {
bool is_support = pred_type == PredicateType::EQ || pred_type == PredicateType::NE ||
pred_type == PredicateType::LT || pred_type == PredicateType::LE ||
pred_type == PredicateType::GT || pred_type == PredicateType::GE ||
pred_type == PredicateType::MATCH ||
pred_type == PredicateType::IN_LIST ||
pred_type == PredicateType::NOT_IN_LIST;
pred_type == PredicateType::MATCH;
if (!is_support) {
_need_read_data_indices[column_id] = true;
continue;
Expand Down Expand Up @@ -1118,7 +1109,7 @@ Status SegmentIterator::_apply_inverted_index_on_column_predicate(
}

auto pred_type = pred->type();
if (pred_type == PredicateType::MATCH || pred_type == PredicateType::IN_LIST) {
if (pred_type == PredicateType::MATCH) {
std::string pred_result_sign = _gen_predicate_result_sign(pred);
_rowid_result_for_index.emplace(pred_result_sign, std::make_pair(false, _row_bitmap));
}
Expand Down Expand Up @@ -2813,12 +2804,6 @@ void SegmentIterator::_calculate_pred_in_remaining_conjunct_root(
} else {
if (node_type == TExprNodeType::MATCH_PRED) {
_column_predicate_info->query_op = "match";
} else if (node_type == TExprNodeType::IN_PRED) {
if (expr->op() == TExprOpcode::type::FILTER_IN) {
_column_predicate_info->query_op = "in";
} else {
_column_predicate_info->query_op = "not_in";
}
} else if (node_type != TExprNodeType::COMPOUND_PRED) {
_column_predicate_info->query_op = expr->fn().name.function_name;
}
Expand Down

0 comments on commit d728555

Please sign in to comment.