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

Function ExecSquelchAgg

src/backend/executor/nodeAgg.c:5207–5225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5205}
5206
5207void
5208ExecSquelchAgg(AggState *node, bool force)
5209{
5210 /*
5211 * Sometimes, ExecSquelchAgg() is called, but the node is rescanned anyway.
5212 * If we destroy the hash table here, then we need to rebuild it later.
5213 * ExecReScanAgg() will try to reuse the hash table if params is not changing
5214 * or affect input expressions, it will rescan the existing hash table.
5215 * Therefore, don't destroy the hash table if reusing hashtable during rescan.
5216 */
5217
5218 if (!node->ss.ps.squelched && (!ReuseHashTable(node) || force))
5219 {
5220 ExecEagerFreeAgg(node);
5221 node->ss.ps.squelched = true;
5222 }
5223
5224 ExecSquelchNode(outerPlanState(node), force);
5225}
5226
5227bool
5228ReuseHashTable(AggState *node)

Callers 1

ExecSquelchNodeFunction · 0.85

Calls 3

ReuseHashTableFunction · 0.85
ExecEagerFreeAggFunction · 0.85
ExecSquelchNodeFunction · 0.85

Tested by

no test coverage detected