!4415 【资源池化】SPQ多机并行bugfix

Merge pull request !4415 from 阙鸣健/spq_aggfix
This commit is contained in:
opengauss_bot
2023-11-13 01:15:29 +00:00
committed by Gitee

View File

@ -3893,7 +3893,7 @@ static void exec_lookups_agg(AggState *aggstate, Agg *node, EState *estate)
#ifdef USE_SPQ
/* Final function only required if we're finalizing the aggregates */
if (t_thrd.spq_ctx.spq_role != ROLE_UTILITY) {
if (DO_AGGSPLIT_SKIPFINAL(aggstate->aggsplittype) && peraggstate->aggref->aggfnoid != STRINGAGGFUNCOID)
if (DO_AGGSPLIT_SKIPFINAL(aggstate->aggsplittype))
peraggstate->finalfn_oid = finalfn_oid = InvalidOid;
else
peraggstate->finalfn_oid = finalfn_oid = aggform->aggfinalfn;