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

Function PlanStateOperatorMemKB

src/backend/executor/execUtils.c:2223–2242  ·  view source on GitHub ↗

* This method is used to determine how much memory a specific operator * is supposed to use (in KB). */

Source from the content-addressed store, hash-verified

2221 * is supposed to use (in KB).
2222 */
2223uint64 PlanStateOperatorMemKB(const PlanState *ps)
2224{
2225 Assert(ps);
2226 Assert(ps->plan);
2227 uint64 result = 0;
2228 if (ps->plan->operatorMemKB == 0)
2229 {
2230 /**
2231 * There are some statements that do not go through the resource queue and these
2232 * plans dont get decorated with the operatorMemKB. Someday, we should fix resource queues.
2233 */
2234 result = work_mem;
2235 }
2236 else
2237 {
2238 result = ps->plan->operatorMemKB;
2239 }
2240
2241 return result;
2242}
2243
2244/**
2245 * Methods to find motionstate object within a planstate tree given a motion id (which is the same as slice index)

Callers 14

ExplainNodeFunction · 0.85
init_tuplestore_stateFunction · 0.85
begin_partitionFunction · 0.85
ExecHashTableExplainEndFunction · 0.85
ExecMaterialFunction · 0.85
ExecHashJoinImplFunction · 0.85
ExecSortFunction · 0.85
FunctionNext_gutsFunction · 0.85
initialize_phaseFunction · 0.85
initialize_aggregateFunction · 0.85
hash_agg_set_limitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected