From: Tomas Vondra Date: Wed, 9 Nov 2016 14:38:31 +0000 (+0100) Subject: fix calls to build_aggregate_fnexprs in nodeWindowAgg X-Git-Tag: XL_10_R1BETA1~510 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=3d060cd710883d81c51fa0b35bfc7149e16c6a29;p=postgres-xl.git fix calls to build_aggregate_fnexprs in nodeWindowAgg But it's as broken as nodeAgg.c. --- diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 064ab4ac02..7c8259dc01 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -2240,29 +2240,21 @@ initialize_peragg(WindowAggState *winstate, WindowFunc *wfunc, numArguments); /* build expression trees using actual argument & result types */ - build_aggregate_fnexprs(inputTypes, - numArguments, - 0, /* no ordered-set window functions yet */ - peraggstate->numFinalArgs, - false, /* no variadic window functions yet */ - aggtranstype, -#ifdef XCP - aggcollecttype, -#endif - wfunc->wintype, - wfunc->inputcollid, - transfn_oid, -#ifdef XCP - collectfn_oid, -#endif - invtransfn_oid, - finalfn_oid, - &transfnexpr, - &invtransfnexpr, -#ifdef XCP - &collectfnexpr, -#endif - &finalfnexpr); + + /* build expression trees using actual argument & result types */ + build_aggregate_transfn_expr(inputTypes, + numArguments, + 0, /* no ordered-set window functions yet */ + false, /* no variadic window functions yet */ + aggtranstype, + aggcollecttype, + wfunc->inputcollid, + transfn_oid, + collectfn_oid, + invtransfn_oid, + &transfnexpr, + &invtransfnexpr, + &collectfnexpr); /* set up infrastructure for calling the transfn(s) and finalfn */ fmgr_info(transfn_oid, &peraggstate->transfn);