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

Function ExecAggEstimate

src/backend/executor/nodeAgg.c:5066–5079  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecAggEstimate * * Estimate space required to propagate aggregate statistics. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

5064 * ----------------------------------------------------------------
5065 */
5066void
5067ExecAggEstimate(AggState *node, ParallelContext *pcxt)
5068{
5069 Size size;
5070
5071 /* don't need this if not instrumenting or no workers */
5072 if (!node->ss.ps.instrument || pcxt->nworkers == 0)
5073 return;
5074
5075 size = mul_size(pcxt->nworkers, sizeof(AggregateInstrumentation));
5076 size = add_size(size, offsetof(SharedAggInfo, sinstrument));
5077 shm_toc_estimate_chunk(&pcxt->estimator, size);
5078 shm_toc_estimate_keys(&pcxt->estimator, 1);
5079}
5080
5081/* ----------------------------------------------------------------
5082 * ExecAggInitializeDSM

Callers 1

ExecParallelEstimateFunction · 0.85

Calls 2

mul_sizeFunction · 0.85
add_sizeFunction · 0.85

Tested by

no test coverage detected