From 1d1d1e009e612139230d2acd41fdd7e4a4fa2f98 Mon Sep 17 00:00:00 2001 From: zzg19950727 <1071026277@qq.com> Date: Mon, 8 May 2023 02:38:37 +0000 Subject: [PATCH] fix generate partition join filter plan bug --- src/sql/optimizer/ob_join_order.cpp | 20 ++++----- src/sql/optimizer/ob_join_order.h | 6 +-- src/sql/optimizer/ob_log_distinct.cpp | 2 +- src/sql/optimizer/ob_log_group_by.cpp | 4 +- src/sql/optimizer/ob_log_plan.cpp | 23 ++++------ src/sql/optimizer/ob_log_window_function.cpp | 2 +- src/sql/optimizer/ob_logical_operator.cpp | 23 ++++------ src/sql/optimizer/ob_logical_operator.h | 2 +- src/sql/optimizer/ob_select_log_plan.cpp | 10 ++--- src/sql/rewrite/ob_query_range.cpp | 18 ++------ .../rewrite/test_query_range_filter.result | 42 +++++++++---------- 11 files changed, 61 insertions(+), 91 deletions(-) diff --git a/src/sql/optimizer/ob_join_order.cpp b/src/sql/optimizer/ob_join_order.cpp index 6b58c42408..3eb2bc6103 100644 --- a/src/sql/optimizer/ob_join_order.cpp +++ b/src/sql/optimizer/ob_join_order.cpp @@ -5233,8 +5233,8 @@ int JoinPath::compute_join_path_ordering() } else if (OB_FAIL(parent_->check_join_interesting_order(this))) { LOG_WARN("failed to update join interesting order info", K(ret)); } else { - is_range_order_ = is_fully_paratition_wise() && left_path_->is_range_order_; - is_local_order_ = is_fully_paratition_wise() && !left_path_->is_range_order_; + is_range_order_ = is_fully_partition_wise() && left_path_->is_range_order_; + is_local_order_ = is_fully_partition_wise() && !left_path_->is_range_order_; } } else { int64_t interesting_order_info = OrderingFlag::NOT_MATCH; @@ -5246,7 +5246,7 @@ int JoinPath::compute_join_path_ordering() LOG_WARN("failed to check all interesting order", K(ret)); } else { add_interesting_order_flag(interesting_order_info); - is_local_order_ = is_fully_paratition_wise(); + is_local_order_ = is_fully_partition_wise(); } } } else { /*do nothing*/ } @@ -8482,8 +8482,7 @@ int ObJoinOrder::get_distributed_join_method(Path &left_path, if (use_shared_hash_join && HASH_JOIN == join_algo) { distributed_methods &= ~DIST_BC2HOST_NONE; } - need_pull_to_local = (right_path.contain_pw_merge_op() && GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0) - || right_path.exchange_allocated_; + need_pull_to_local = right_path.exchange_allocated_; } } } @@ -8553,7 +8552,7 @@ int ObJoinOrder::get_distributed_join_method(Path &left_path, OPT_TRACE("plan will use none partition method and prune none broadcast/hash method"); distributed_methods &= ~DIST_NONE_BROADCAST; distributed_methods &= ~DIST_NONE_HASH; - need_pull_to_local = left_path.contain_pw_merge_op() && GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0; + need_pull_to_local = false; } } } @@ -8618,9 +8617,9 @@ bool ObJoinOrder::is_repart_valid(const Path &left_path, const Path &right_path, if (DistAlgo::DIST_PARTITION_NONE == dist_algo && right_path.exchange_allocated_ && is_nl) { is_valid = false; } else if (DistAlgo::DIST_PARTITION_NONE == dist_algo && right_path.contain_pw_merge_op()) { - is_valid = GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_4_1_0_0; + is_valid = true; } else if (DistAlgo::DIST_NONE_PARTITION == dist_algo && left_path.contain_pw_merge_op()) { - is_valid = GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_4_1_0_0; + is_valid = true; } else { is_valid = true; } @@ -9382,6 +9381,7 @@ int ObJoinOrder::find_possible_join_filter_tables(const ObLogPlanHint &log_plan_ } } else if (right_path.is_join_path()) { const JoinPath &join_path = static_cast(right_path); + is_fully_partition_wise |= join_path.is_fully_partition_wise(); if (OB_ISNULL(join_path.left_path_) || OB_ISNULL(join_path.left_path_->parent_)) { ret = OB_ERR_UNEXPECTED; @@ -9393,7 +9393,7 @@ int ObJoinOrder::find_possible_join_filter_tables(const ObLogPlanHint &log_plan_ right_tables, config_disable, !join_path.is_left_need_exchange() && is_current_dfo, - join_path.is_fully_paratition_wise(), + is_fully_partition_wise, left_join_conditions, right_join_conditions, join_filter_infos)))) { @@ -9411,7 +9411,7 @@ int ObJoinOrder::find_possible_join_filter_tables(const ObLogPlanHint &log_plan_ right_tables, config_disable, !join_path.is_right_need_exchange() && is_current_dfo, - join_path.is_fully_paratition_wise(), + is_fully_partition_wise, left_join_conditions, right_join_conditions, join_filter_infos)))) { diff --git a/src/sql/optimizer/ob_join_order.h b/src/sql/optimizer/ob_join_order.h index 7516c07a07..238ef2f9fc 100644 --- a/src/sql/optimizer/ob_join_order.h +++ b/src/sql/optimizer/ob_join_order.h @@ -813,12 +813,12 @@ struct EstimateCostInfo { inline bool is_left_local_order() const { return NULL != left_path_ && NULL != right_path_ && !left_sort_keys_.empty() && - left_path_->is_local_order_ && !is_fully_paratition_wise(); + left_path_->is_local_order_ && !is_fully_partition_wise(); } inline bool is_right_local_order() const { return NULL != right_path_ && NULL != left_path_ && !right_sort_keys_.empty() && - right_path_->is_local_order_ && !is_fully_paratition_wise(); + right_path_->is_local_order_ && !is_fully_partition_wise(); } inline bool is_left_need_sort() const { @@ -853,7 +853,7 @@ struct EstimateCostInfo { return dist_method; } - inline bool is_fully_paratition_wise() const { + inline bool is_fully_partition_wise() const { return is_partition_wise() && !exchange_allocated_; } inline bool is_partition_wise() const diff --git a/src/sql/optimizer/ob_log_distinct.cpp b/src/sql/optimizer/ob_log_distinct.cpp index 5f12ee1459..ab2771ca85 100644 --- a/src/sql/optimizer/ob_log_distinct.cpp +++ b/src/sql/optimizer/ob_log_distinct.cpp @@ -77,7 +77,7 @@ int ObLogDistinct::compute_op_ordering() } else if (OB_FAIL(ObLogicalOperator::compute_op_ordering())) { LOG_WARN("failed to compute op ordering", K(ret)); } else { - is_local_order_ = is_fully_paratition_wise() && !get_op_ordering().empty(); + is_local_order_ = is_fully_partition_wise() && !get_op_ordering().empty(); } return ret; } diff --git a/src/sql/optimizer/ob_log_group_by.cpp b/src/sql/optimizer/ob_log_group_by.cpp index d477b81f37..09035974b6 100644 --- a/src/sql/optimizer/ob_log_group_by.cpp +++ b/src/sql/optimizer/ob_log_group_by.cpp @@ -680,13 +680,13 @@ int ObLogGroupBy::compute_op_ordering() LOG_WARN("failed to set op ordering.", K(ret)); } else { is_range_order_ = child->get_is_range_order(); - is_local_order_ = is_fully_paratition_wise() && !get_op_ordering().empty(); + is_local_order_ = is_fully_partition_wise() && !get_op_ordering().empty(); } } else if (OB_FAIL(set_op_ordering(child->get_op_ordering()))) { LOG_WARN("failed to set op ordering", K(ret)); } else { is_range_order_ = child->get_is_range_order(); - is_local_order_ = is_fully_paratition_wise() && !get_op_ordering().empty(); + is_local_order_ = is_fully_partition_wise() && !get_op_ordering().empty(); } return ret; } diff --git a/src/sql/optimizer/ob_log_plan.cpp b/src/sql/optimizer/ob_log_plan.cpp index 7f750b8178..046576b9b7 100644 --- a/src/sql/optimizer/ob_log_plan.cpp +++ b/src/sql/optimizer/ob_log_plan.cpp @@ -11552,19 +11552,6 @@ int ObLogPlan::adjust_final_plan_info(ObLogicalOperator *&op) } } - if (OB_SUCC(ret) && op->get_type() == LOG_SELECT_INTO && !op->is_plan_root() && - GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0) { - if (!op->get_stmt()->is_select_stmt()) { - ret = OB_ERR_UNEXPECTED; - LOG_WARN("unexpected stmt type", K(ret)); - } else { - const ObSelectStmt *sel_stmt = static_cast(op->get_stmt()); - if (OB_FAIL(sel_stmt->get_select_exprs(op->get_output_exprs()))) { - LOG_WARN("failed to get select exprs", K(ret)); - } - } - } - if (OB_SUCC(ret)) { if (op->is_plan_root() && OB_FAIL(op->set_plan_root_output_exprs())) { LOG_WARN("failed to add plan root exprs", K(ret)); @@ -13289,6 +13276,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, } else if (op->get_type() == log_op_def::LOG_SET) { ObLogSet *log_set = static_cast(op); bool is_ext_pw = (log_set->get_distributed_algo() == DistAlgo::DIST_SET_PARTITION_WISE); + is_fully_partition_wise |= (op->is_fully_partition_wise() || is_ext_pw); for (int64_t i = 0; OB_SUCC(ret) && i < op->get_num_of_child(); ++i) { ObLogicalOperator* child_op; ObLogPlan* child_plan; @@ -13301,7 +13289,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, ObTabletID::INVALID_TABLET_ID, hint_info, is_current_dfo, - op->is_fully_paratition_wise() || is_ext_pw, + is_fully_partition_wise, left_join_conditions, right_join_conditions, join_filter_infos))) { @@ -13427,6 +13415,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, ObLogJoin* join_op = static_cast(op); ObLogicalOperator* left_op; ObLogicalOperator* right_op; + is_fully_partition_wise |= join_op->is_fully_partition_wise(); if (OB_UNLIKELY(2 != op->get_num_of_child()) || OB_ISNULL(left_op = op->get_child(ObLogicalOperator::first_child)) || OB_ISNULL(right_op = op->get_child(ObLogicalOperator::second_child))) { @@ -13436,7 +13425,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, hint_info, right_tables, is_current_dfo, - join_op->is_fully_paratition_wise(), + is_fully_partition_wise, left_join_conditions, right_join_conditions, join_filter_infos)))) { @@ -13445,7 +13434,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, hint_info, right_tables, is_current_dfo, - join_op->is_fully_paratition_wise(), + is_fully_partition_wise, left_join_conditions, right_join_conditions, join_filter_infos)))) { @@ -13460,6 +13449,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, static_cast(op)->is_local()) { /* do nothing */ } else if (log_op_def::LOG_SUBPLAN_FILTER == op->get_type()) { + is_fully_partition_wise |= op->is_fully_partition_wise(); if (OB_FAIL(SMART_CALL(find_possible_join_filter_tables(op->get_child(ObLogicalOperator::first_child), hint_info, right_tables, @@ -13471,6 +13461,7 @@ int ObLogPlan::find_possible_join_filter_tables(ObLogicalOperator *op, LOG_WARN("failed to find shuffle table scan", K(ret)); } } else { + is_fully_partition_wise |= op->is_fully_partition_wise(); for (int64_t i = 0; OB_SUCC(ret) && i < op->get_num_of_child(); ++i) { if (OB_FAIL(SMART_CALL(find_possible_join_filter_tables(op->get_child(i), hint_info, diff --git a/src/sql/optimizer/ob_log_window_function.cpp b/src/sql/optimizer/ob_log_window_function.cpp index 393eda0c5b..3226d91266 100644 --- a/src/sql/optimizer/ob_log_window_function.cpp +++ b/src/sql/optimizer/ob_log_window_function.cpp @@ -340,7 +340,7 @@ int ObLogWindowFunction::compute_op_ordering() ret = OB_ERR_UNEXPECTED; LOG_WARN("first child is null", K(ret), K(child)); } else if (!single_part_parallel_) { - is_local_order_ = (range_dist_parallel_ || is_fully_paratition_wise() + is_local_order_ = (range_dist_parallel_ || is_fully_partition_wise() || (get_sort_keys().empty() && LOG_EXCHANGE == child->get_type() && child->get_is_local_order()) diff --git a/src/sql/optimizer/ob_logical_operator.cpp b/src/sql/optimizer/ob_logical_operator.cpp index 2d0cdfa254..490e5df87b 100644 --- a/src/sql/optimizer/ob_logical_operator.cpp +++ b/src/sql/optimizer/ob_logical_operator.cpp @@ -3373,20 +3373,11 @@ int ObLogicalOperator::adjust_plan_root_output_exprs() FALSE_IT(into_item = static_cast(stmt)->get_select_into())) { /*do nothing*/ } else if (NULL == get_parent()) { - if (NULL != into_item && T_INTO_OUTFILE == into_item->into_type_ && - GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0) { - if (OB_FAIL(build_and_put_into_outfile_expr(into_item, output_exprs_))) { - LOG_WARN("failed to add into outfile expr to ctx", K(ret)); - } else { - LOG_TRACE("succeed to add into outfile expr to ctx", K(ret)); - } - } else { - bool need_pack = false; - if (OB_FAIL(check_stmt_can_be_packed(stmt, need_pack))) { - LOG_WARN("failed to check stmt can be pack", K(ret)); - } else if (need_pack && OB_FAIL(build_and_put_pack_expr(output_exprs_))) { - LOG_WARN("failed to add pack expr to context", K(ret)); - } + bool need_pack = false; + if (OB_FAIL(check_stmt_can_be_packed(stmt, need_pack))) { + LOG_WARN("failed to check stmt can be pack", K(ret)); + } else if (need_pack && OB_FAIL(build_and_put_pack_expr(output_exprs_))) { + LOG_WARN("failed to add pack expr to context", K(ret)); } LOG_TRACE("succeed to adjust plan root output exprs", K(output_exprs_)); } @@ -4121,7 +4112,7 @@ int ObLogicalOperator::allocate_gi_recursively(AllocGIContext &ctx) if (OB_FAIL(allocate_granule_nodes_above(ctx))) { LOG_WARN("allocate gi above table scan failed", K(ret)); } - } else if (is_fully_paratition_wise() && GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_4_1_0_0) { + } else if (is_fully_partition_wise()) { ctx.alloc_gi_ = true; if (OB_FAIL(allocate_granule_nodes_above(ctx))) { LOG_WARN("allocate gi above table scan failed", K(ret)); @@ -4195,7 +4186,7 @@ int ObLogicalOperator::pw_allocate_granule_post(AllocGIContext &ctx) // so that won't work in the plan found in this bug. // Now we support GI rescan in partition_wise_state so we just push up the GI here in such case // - if (ctx.is_in_partition_wise_state() && is_fully_paratition_wise()) { + if (ctx.is_in_partition_wise_state() && is_fully_partition_wise()) { ctx.alloc_gi_ = true; if (OB_FAIL(allocate_granule_nodes_above(ctx))) { LOG_WARN("allocate gi above table scan failed", K(ret)); diff --git a/src/sql/optimizer/ob_logical_operator.h b/src/sql/optimizer/ob_logical_operator.h index 1391d14f5f..1a1bdb41b4 100644 --- a/src/sql/optimizer/ob_logical_operator.h +++ b/src/sql/optimizer/ob_logical_operator.h @@ -1025,7 +1025,7 @@ public: inline bool is_partition_wise() const { return is_partition_wise_; } inline void set_is_partition_wise(bool is_partition_wise) { is_partition_wise_ = is_partition_wise; } - inline bool is_fully_paratition_wise() const + inline bool is_fully_partition_wise() const { return is_partition_wise() && !exchange_allocated_; } diff --git a/src/sql/optimizer/ob_select_log_plan.cpp b/src/sql/optimizer/ob_select_log_plan.cpp index 46cc300ccd..beb6457786 100644 --- a/src/sql/optimizer/ob_select_log_plan.cpp +++ b/src/sql/optimizer/ob_select_log_plan.cpp @@ -2969,7 +2969,7 @@ int ObSelectLogPlan::get_distributed_set_methods(const EqualSets &equal_sets, set_dist_methods &= ~DistAlgo::DIST_PARTITION_NONE; OPT_TRACE("plan will not use partition none method"); } else { - need_pull_to_local = right_child.get_contains_pw_merge_op() && GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0; + need_pull_to_local = false; set_dist_methods &= ~DistAlgo::DIST_HASH_NONE; OPT_TRACE("plan will use partition none method"); } @@ -3005,7 +3005,7 @@ int ObSelectLogPlan::get_distributed_set_methods(const EqualSets &equal_sets, set_dist_methods &= ~DistAlgo::DIST_NONE_PARTITION; OPT_TRACE("plan will not use none partition method"); } else { - need_pull_to_local = left_child.get_contains_pw_merge_op() && GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0; + need_pull_to_local = false; set_dist_methods &= ~DistAlgo::DIST_NONE_HASH; OPT_TRACE("plan will use none partition method"); } @@ -3059,9 +3059,9 @@ bool ObSelectLogPlan::is_set_repart_valid(const ObLogicalOperator &left_plan, { bool is_valid = true; if (DistAlgo::DIST_PARTITION_NONE == dist_algo && right_plan.get_contains_pw_merge_op()) { - is_valid = GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_4_1_0_0; + is_valid = true; } else if (DistAlgo::DIST_NONE_PARTITION == dist_algo && left_plan.get_contains_pw_merge_op()) { - is_valid = GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_4_1_0_0; + is_valid = true; } else { is_valid = true; } @@ -5203,8 +5203,6 @@ int ObSelectLogPlan::check_winfunc_pushdown( if (OB_ISNULL(top)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("top is null", K(ret)); - } else if (GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_1_0_0) { - is_pushdown = false; } else if (WinDistAlgo::HASH != method) { is_pushdown = false; } else { diff --git a/src/sql/rewrite/ob_query_range.cpp b/src/sql/rewrite/ob_query_range.cpp index 3ca7826f3c..882a563fa0 100644 --- a/src/sql/rewrite/ob_query_range.cpp +++ b/src/sql/rewrite/ob_query_range.cpp @@ -3667,20 +3667,10 @@ int ObQueryRange::preliminary_extract(const ObRawExpr *node, LOG_WARN("extract not_btw failed", K(ret)); } } else if (T_OP_IN == node->get_expr_type()) { - if (GET_MIN_CLUSTER_VERSION() >= CLUSTER_VERSION_4_1_0_0) { - if (OB_FAIL(pre_extract_in_op(b_expr, out_key_part, dtc_params))) { - LOG_WARN("extract single in_op failed", K(ret)); - } else if (!out_key_part->is_always_true() && !out_key_part->is_always_false()) { - contain_in_ = true; - } - } else { - if (is_single_in) { - if (OB_FAIL(pre_extract_single_in_op(b_expr, out_key_part, dtc_params))) { - LOG_WARN("extract single in_op failed", K(ret)); - } - } else if (OB_FAIL(pre_extract_complex_in_op(b_expr, out_key_part, dtc_params))) { - LOG_WARN("extract in_op failed", K(ret)); - } + if (OB_FAIL(pre_extract_in_op(b_expr, out_key_part, dtc_params))) { + LOG_WARN("extract single in_op failed", K(ret)); + } else if (!out_key_part->is_always_true() && !out_key_part->is_always_false()) { + contain_in_ = true; } } else if (T_OP_NOT_IN == node->get_expr_type()) { if (OB_FAIL(pre_extract_not_in_op(b_expr, out_key_part, dtc_params))) { diff --git a/unittest/sql/rewrite/test_query_range_filter.result b/unittest/sql/rewrite/test_query_range_filter.result index 6e0022dceb..59200f0cb9 100644 --- a/unittest/sql/rewrite/test_query_range_filter.result +++ b/unittest/sql/rewrite/test_query_range_filter.result @@ -651,20 +651,20 @@ count of rang columns = 2 [{"range":"table_id:3003,group_idx:0,[{"BIGINT":1},{"BIGINT":1};{"BIGINT":1},{"BIGINT":1}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":2},{"BIGINT":2};{"BIGINT":2},{"BIGINT":2}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":3},{"BIGINT":3};{"BIGINT":3},{"BIGINT":3}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":4},{"BIGINT":4};{"BIGINT":4},{"BIGINT":4}]"}] **rowkey num = 3** -**filter count = 1** +**filter count = 0** is not min_to_max_range ranges.count() = 4 -all_single_value_ranges = 1 -star_border_flag[0] = 1 -end_border_flag[0] = 1 -star_border_flag[1] = 1 -end_border_flag[1] = 1 -star_border_flag[2] = 1 -end_border_flag[2] = 1 -star_border_flag[3] = 1 -end_border_flag[3] = 1 +all_single_value_ranges = 0 +star_border_flag[0] = 0 +end_border_flag[0] = 0 +star_border_flag[1] = 0 +end_border_flag[1] = 0 +star_border_flag[2] = 0 +end_border_flag[2] = 0 +star_border_flag[3] = 0 +end_border_flag[3] = 0 count of rang columns = 3 -[{"range":"table_id:3003,group_idx:0,[{"BIGINT":1},{"BIGINT":1},{"BIGINT":1};{"BIGINT":1},{"BIGINT":1},{"BIGINT":1}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":2},{"BIGINT":2},{"BIGINT":2};{"BIGINT":2},{"BIGINT":2},{"BIGINT":2}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":3},{"BIGINT":3},{"BIGINT":1};{"BIGINT":3},{"BIGINT":3},{"BIGINT":1}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":4},{"BIGINT":4},{"BIGINT":1};{"BIGINT":4},{"BIGINT":4},{"BIGINT":1}]"}] +[{"range":"table_id:3003,group_idx:0,({"BIGINT":1},{"BIGINT":1},MIN;{"BIGINT":1},{"BIGINT":1},MAX)"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":2},{"BIGINT":2},MIN;{"BIGINT":2},{"BIGINT":2},MAX)"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":3},{"BIGINT":3},MIN;{"BIGINT":3},{"BIGINT":3},MAX)"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":4},{"BIGINT":4},MIN;{"BIGINT":4},{"BIGINT":4},MAX)"}] [16] (a, b, c) in ((?{1},?{1},?{1}),(?{2},?{2},?{2})) or (a,b) in ((?{3},?{3}),(?{4},?{4})) or a = ?{1} @@ -689,32 +689,32 @@ count of rang columns = 1 is not min_to_max_range ranges.count() = 4 all_single_value_ranges = 0 -star_border_flag[0] = 0 -end_border_flag[0] = 0 +star_border_flag[0] = 1 +end_border_flag[0] = 1 star_border_flag[1] = 1 end_border_flag[1] = 1 star_border_flag[2] = 1 end_border_flag[2] = 1 -star_border_flag[3] = 1 -end_border_flag[3] = 1 +star_border_flag[3] = 0 +end_border_flag[3] = 0 count of rang columns = 2 -[{"range":"table_id:3003,group_idx:0,({"BIGINT":1},MIN;{"BIGINT":1},MAX)"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":2},{"BIGINT":2};{"BIGINT":2},{"BIGINT":2}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":3},{"BIGINT":3};{"BIGINT":3},{"BIGINT":3}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":4},{"BIGINT":4};{"BIGINT":4},{"BIGINT":4}]"}] +[{"range":"table_id:3003,group_idx:0,[{"BIGINT":2},{"BIGINT":2};{"BIGINT":2},{"BIGINT":2}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":3},{"BIGINT":3};{"BIGINT":3},{"BIGINT":3}]"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":4},{"BIGINT":4};{"BIGINT":4},{"BIGINT":4}]"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":1},MIN;{"BIGINT":1},MAX)"}] **rowkey num = 3** **filter count = 0** is not min_to_max_range ranges.count() = 4 all_single_value_ranges = 0 -star_border_flag[0] = 0 -end_border_flag[0] = 0 -star_border_flag[1] = 1 -end_border_flag[1] = 1 +star_border_flag[0] = 1 +end_border_flag[0] = 1 +star_border_flag[1] = 0 +end_border_flag[1] = 0 star_border_flag[2] = 0 end_border_flag[2] = 0 star_border_flag[3] = 0 end_border_flag[3] = 0 count of rang columns = 3 -[{"range":"table_id:3003,group_idx:0,({"BIGINT":1},MIN,MIN;{"BIGINT":1},MAX,MAX)"}, {"range":"table_id:3003,group_idx:0,[{"BIGINT":2},{"BIGINT":2},{"BIGINT":2};{"BIGINT":2},{"BIGINT":2},{"BIGINT":2}]"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":3},{"BIGINT":3},MIN;{"BIGINT":3},{"BIGINT":3},MAX)"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":4},{"BIGINT":4},MIN;{"BIGINT":4},{"BIGINT":4},MAX)"}] +[{"range":"table_id:3003,group_idx:0,[{"BIGINT":2},{"BIGINT":2},{"BIGINT":2};{"BIGINT":2},{"BIGINT":2},{"BIGINT":2}]"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":3},{"BIGINT":3},MIN;{"BIGINT":3},{"BIGINT":3},MAX)"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":4},{"BIGINT":4},MIN;{"BIGINT":4},{"BIGINT":4},MAX)"}, {"range":"table_id:3003,group_idx:0,({"BIGINT":1},MIN,MIN;{"BIGINT":1},MAX,MAX)"}] [17] a = 1 and c = 1 or (a = 2 and b = 2)