[FEAT MERGE] support auto dop

This commit is contained in:
obdev
2023-04-28 15:11:52 +00:00
committed by ob-robot
parent 642f1c7d84
commit b41dc0ebdd
106 changed files with 3815 additions and 2844 deletions

View File

@ -261,22 +261,18 @@ int ObLogWindowFunction::est_cost()
return ret;
}
int ObLogWindowFunction::re_est_cost(EstimateCostInfo &param, double &card, double &cost)
int ObLogWindowFunction::do_re_est_cost(EstimateCostInfo &param, double &card, double &op_cost, double &cost)
{
int ret = OB_SUCCESS;
int64_t parallel = 0;
const int64_t parallel = param.need_parallel_;
ObLogicalOperator *child = NULL;
if (OB_ISNULL(get_plan()) ||
OB_ISNULL(child = get_child(ObLogicalOperator::first_child))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(child), K(ret));
} else if (OB_UNLIKELY((parallel = get_parallel()) < 1)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected parallel degree", K(parallel), K(ret));
} else {
double child_card = child->get_card();
double child_cost = child->get_cost();
double op_cost = 0.0;
ObOptimizerContext &opt_ctx = get_plan()->get_optimizer_context();
if (is_block_op()) {
param.need_row_count_ = -1; //reset need row count
@ -292,11 +288,6 @@ int ObLogWindowFunction::re_est_cost(EstimateCostInfo &param, double &card, doub
} else {
cost = child_cost + op_cost;
card = child_card;
if (param.override_) {
set_op_cost(op_cost);
set_cost(cost);
set_card(card);
}
}
}
return ret;