MCPcopy Create free account
hub / github.com/apache/cloudberry / makeNumericAggStateCurrentContext

Function makeNumericAggStateCurrentContext

src/backend/utils/adt/numeric.c:4651–4661  ·  view source on GitHub ↗

* Like makeNumericAggState(), but allocate the state in the current memory * context. */

Source from the content-addressed store, hash-verified

4649 * context.
4650 */
4651static NumericAggState *
4652makeNumericAggStateCurrentContext(bool calcSumX2)
4653{
4654 NumericAggState *state;
4655
4656 state = (NumericAggState *) palloc0(sizeof(NumericAggState));
4657 state->calcSumX2 = calcSumX2;
4658 state->agg_context = CurrentMemoryContext;
4659
4660 return state;
4661}
4662
4663/*
4664 * Accumulate a new input value for numeric aggregate functions.

Callers 4

numeric_combineFunction · 0.85
numeric_avg_combineFunction · 0.85
numeric_avg_deserializeFunction · 0.85
numeric_deserializeFunction · 0.85

Calls 1

palloc0Function · 0.50

Tested by

no test coverage detected