fix an exec_param and a expr copy_on_replace bugs

This commit is contained in:
jingtaoye35
2024-02-09 12:25:58 +00:00
committed by ob-robot
parent 49c4063930
commit a291a8ffaf
7 changed files with 196 additions and 24 deletions

View File

@ -637,6 +637,7 @@ int ObLogSubPlanFilter::replace_nested_subquery_exprs(ObRawExprReplacer &replace
}
for (int64_t i = 0; OB_SUCC(ret) && i < subquery_exprs_.count(); ++i) {
ObRawExpr *expr = subquery_exprs_.at(i);
int64_t ref_id = subquery_exprs_.at(i)->get_ref_id();
if (ObOptimizerUtil::find_item(plan->get_onetime_query_refs(), expr)) {
// do not replace onetime expr ref query, only adjust nested subquery
} else if (OB_FAIL(replace_expr_action(replacer, expr))) {
@ -648,6 +649,7 @@ int ObLogSubPlanFilter::replace_nested_subquery_exprs(ObRawExprReplacer &replace
LOG_WARN("unexpected expr type", K(ret));
} else {
subquery_exprs_.at(i) = static_cast<ObQueryRefRawExpr*>(expr);
subquery_exprs_.at(i)->set_ref_id(ref_id);
}
}
return ret;