[CP] fix adaptive gby do not eval param expr in single row mode

This commit is contained in:
obdev
2022-12-29 08:12:03 +00:00
committed by ob-robot
parent 4996ffad0b
commit 1c7f8a3981

View File

@ -5855,6 +5855,13 @@ int ObAggregateProcessor::fast_single_row_agg(ObEvalCtx &eval_ctx)
if (aggr_info.is_implicit_first_aggr()) { if (aggr_info.is_implicit_first_aggr()) {
continue; continue;
} }
for (int64_t j = 0; OB_SUCC(ret) && j < aggr_info.param_exprs_.count(); ++j) {
ObDatum *tmp_res = nullptr;
if (OB_FAIL(aggr_info.param_exprs_.at(j)->eval(eval_ctx, tmp_res))) {
LOG_WARN("failed to eval param expr", K(ret), K(j));
}
}
if (OB_SUCC(ret)) {
const ObItemType aggr_fun = aggr_info.get_expr_type(); const ObItemType aggr_fun = aggr_info.get_expr_type();
switch (aggr_fun) { switch (aggr_fun) {
case T_FUN_COUNT: { case T_FUN_COUNT: {
@ -5903,6 +5910,7 @@ int ObAggregateProcessor::fast_single_row_agg(ObEvalCtx &eval_ctx)
} }
} }
} }
}
return ret; return ret;
} }