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

Function getMotionState

src/backend/executor/execUtils.c:2283–2298  ·  view source on GitHub ↗

* Given a slice index, find the motionstate that corresponds to this slice index. This will iterate over the planstate tree * to get the right node. */

Source from the content-addressed store, hash-verified

2281 * to get the right node.
2282 */
2283MotionState *
2284getMotionState(struct PlanState *ps, int sliceIndex)
2285{
2286 Assert(ps);
2287 Assert(sliceIndex > -1);
2288
2289 MotionStateFinderContext ctx;
2290 ctx.motionId = sliceIndex;
2291 ctx.motionState = NULL;
2292 planstate_walk_node(ps, MotionStateFinderWalker, &ctx);
2293
2294 if (ctx.motionState == NULL)
2295 elog(ERROR, "could not find MotionState for slice %d in executor tree", sliceIndex);
2296
2297 return ctx.motionState;
2298}
2299
2300typedef struct MotionFinderContext
2301{

Callers 4

cdbexplain_sendExecStatsFunction · 0.85
standard_ExecutorStartFunction · 0.85
standard_ExecutorRunFunction · 0.85
standard_ExecutorFinishFunction · 0.85

Calls 1

planstate_walk_nodeFunction · 0.85

Tested by

no test coverage detected