[CP] fix exec_param nested problem

This commit is contained in:
jingtaoye35
2024-02-08 20:50:21 +00:00
committed by ob-robot
parent 64b972e13f
commit 0581e5049c
3 changed files with 24 additions and 44 deletions

View File

@ -92,7 +92,7 @@ int ObSelectLogPlan::candi_allocate_group_by()
OB_FAIL(append(candi_subquery_exprs, stmt->get_rollup_exprs())) ||
OB_FAIL(append(candi_subquery_exprs, stmt->get_aggr_items()))) {
LOG_WARN("failed to append exprs", K(ret));
} else if (OB_FAIL(candi_allocate_subplan_filter_for_exprs(candi_subquery_exprs))) {
} else if (OB_FAIL(candi_allocate_subplan_filter(candi_subquery_exprs))) {
LOG_WARN("failed to allocate subplan filter for exprs", K(ret));
} else if (stmt->is_scala_group_by()) {
if (OB_FAIL(ObOptimizerUtil::classify_subquery_exprs(stmt->get_having_exprs(),
@ -1391,7 +1391,7 @@ int ObSelectLogPlan::candi_allocate_distinct()
LOG_WARN("get unexpected null", K(ret));
} else if (OB_FAIL(get_distinct_exprs(best_plan, reduce_exprs, distinct_exprs))) {
LOG_WARN("failed to get select columns", K(ret));
} else if (OB_FAIL(candi_allocate_subplan_filter_for_exprs(distinct_exprs))) {
} else if (OB_FAIL(candi_allocate_subplan_filter(distinct_exprs))) {
LOG_WARN("failed to allocate subplan filter for exprs", K(ret));
} else if (distinct_exprs.empty()) {
// if all the distinct exprs are const, we add limit operator instead of distinct operator
@ -4631,13 +4631,8 @@ int ObSelectLogPlan::candi_allocate_subplan_filter_for_select_item()
LOG_WARN("null stmt", K(select_stmt), K(ret));
} else if (OB_FAIL(select_stmt->get_select_exprs(select_exprs))) {
LOG_WARN("failed to get select exprs", K(ret));
} else if (OB_FAIL(ObOptimizerUtil::get_subquery_exprs(select_exprs,
subquery_exprs))) {
LOG_WARN("failed to get subquery exprs", K(ret));
} else if (subquery_exprs.empty()) {
/*do nothing*/
} else if (OB_FAIL(candi_allocate_subplan_filter(subquery_exprs))) {
LOG_WARN("failed to allocate subplan filter for select item", K(ret));
} else if (OB_FAIL(candi_allocate_subplan_filter(select_exprs))) {
LOG_WARN("failed to candi allocate subplan filter for exprs", K(ret));
} else {
LOG_TRACE("succeed to allocate subplan filter for select item", K(select_stmt->get_stmt_id()));
}
@ -4748,7 +4743,7 @@ int ObSelectLogPlan::candi_allocate_window_function()
LOG_WARN("unexpected params", K(ret), K(stmt), K(stmt->has_window_function()));
} else if (OB_FAIL(append(candi_subquery_exprs, stmt->get_window_func_exprs()))) {
LOG_WARN("failed to append exprs", K(ret));
} else if (OB_FAIL(candi_allocate_subplan_filter_for_exprs(candi_subquery_exprs))) {
} else if (OB_FAIL(candi_allocate_subplan_filter(candi_subquery_exprs))) {
LOG_WARN("failed to do allocate subplan filter", K(ret));
} else if (OB_FAIL(candi_allocate_window_function_with_hint(stmt->get_window_func_exprs(),
stmt->get_qualify_filters(),