diff options
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r-- | src/backend/executor/nodeAgg.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index b0f9520e530..de9a18e71c3 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -752,7 +752,7 @@ initialize_aggregate(AggState *aggstate, AggStatePerTrans pertrans, MemoryContext oldContext; oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(pertrans->initValue, pertrans->transtypeByVal, pertrans->transtypeLen); @@ -869,7 +869,7 @@ advance_transition_function(AggState *aggstate, * do not need to pfree the old transValue, since it's NULL. */ oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(fcinfo->arg[1], pertrans->transtypeByVal, pertrans->transtypeLen); @@ -1200,9 +1200,9 @@ advance_combine_function(AggState *aggstate, if (!pertrans->transtypeByVal) { oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(fcinfo->arg[1], - pertrans->transtypeByVal, + pertrans->transtypeByVal, pertrans->transtypeLen); MemoryContextSwitchTo(oldContext); } @@ -1530,7 +1530,7 @@ finalize_aggregate(AggState *aggstate, /* Fill in the transition state value */ fcinfo.arg[0] = MakeExpandedObjectReadOnly(pergroupstate->transValue, - pergroupstate->transValueIsNull, + pergroupstate->transValueIsNull, pertrans->transtypeLen); fcinfo.argnull[0] = pergroupstate->transValueIsNull; anynull |= pergroupstate->transValueIsNull; @@ -1610,8 +1610,8 @@ finalize_partialaggregate(AggState *aggstate, FunctionCallInfo fcinfo = &pertrans->serialfn_fcinfo; fcinfo->arg[0] = MakeExpandedObjectReadOnly(pergroupstate->transValue, - pergroupstate->transValueIsNull, - pertrans->transtypeLen); + pergroupstate->transValueIsNull, + pertrans->transtypeLen); fcinfo->argnull[0] = pergroupstate->transValueIsNull; *resultVal = FunctionCallInvoke(fcinfo); @@ -1872,9 +1872,9 @@ build_hash_table(AggState *aggstate) perhash->hashfunctions, perhash->aggnode->numGroups, additionalsize, - aggstate->hashcontext->ecxt_per_tuple_memory, + aggstate->hashcontext->ecxt_per_tuple_memory, tmpmem, - DO_AGGSPLIT_SKIPFINAL(aggstate->aggsplit)); + DO_AGGSPLIT_SKIPFINAL(aggstate->aggsplit)); } } @@ -2051,7 +2051,7 @@ lookup_hash_entry(AggState *aggstate) { entry->additional = (AggStatePerGroup) MemoryContextAlloc(perhash->hashtable->tablecxt, - sizeof(AggStatePerGroupData) * aggstate->numtrans); + sizeof(AggStatePerGroupData) * aggstate->numtrans); /* initialize aggregates for new tuple group */ initialize_aggregates(aggstate, (AggStatePerGroup) entry->additional, -1); @@ -2433,7 +2433,7 @@ agg_retrieve_direct(AggState *aggstate) node->numCols, node->grpColIdx, aggstate->phase->eqfunctions, - tmpcontext->ecxt_per_tuple_memory)) + tmpcontext->ecxt_per_tuple_memory)) { aggstate->grp_firstTuple = ExecCopySlotTuple(outerslot); break; @@ -2817,7 +2817,7 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) ExecAssignScanTypeFromOuterPlan(&aggstate->ss); if (node->chain) ExecSetSlotDescriptor(aggstate->sort_slot, - aggstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor); + aggstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor); /* * Initialize result tuple type and projection info. @@ -2933,7 +2933,7 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) } all_grouped_cols = bms_add_members(all_grouped_cols, - phasedata->grouped_cols[0]); + phasedata->grouped_cols[0]); } else { @@ -3304,8 +3304,8 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) */ existing_transno = find_compatible_pertrans(aggstate, aggref, transfn_oid, aggtranstype, - serialfn_oid, deserialfn_oid, - initValue, initValueIsNull, + serialfn_oid, deserialfn_oid, + initValue, initValueIsNull, same_input_transnos); if (existing_transno != -1) { @@ -3977,7 +3977,7 @@ ExecReScanAgg(AggState *node) * Reset the per-group state (in particular, mark transvalues null) */ MemSet(node->pergroup, 0, - sizeof(AggStatePerGroupData) * node->numaggs * numGroupingSets); + sizeof(AggStatePerGroupData) * node->numaggs * numGroupingSets); /* reset to phase 1 */ initialize_phase(node, 1); |