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

Function MotionFinderWalker

src/backend/executor/execUtils.c:2310–2333  ·  view source on GitHub ↗

* Walker to find a motion node that matches a particular motionID */

Source from the content-addressed store, hash-verified

2308 * Walker to find a motion node that matches a particular motionID
2309 */
2310static bool
2311MotionFinderWalker(Plan *node,
2312 void *context)
2313{
2314 Assert(context);
2315 MotionFinderContext *ctx = (MotionFinderContext *) context;
2316
2317
2318 if (node == NULL)
2319 return false;
2320
2321 if (IsA(node, Motion))
2322 {
2323 Motion *m = (Motion *) node;
2324 if (m->motionID == ctx->motionId)
2325 {
2326 ctx->motion = m;
2327 return true; /* found our node; no more visit */
2328 }
2329 }
2330
2331 /* Continue walking */
2332 return plan_tree_walker((Node*)node, MotionFinderWalker, ctx, true);
2333}
2334
2335/*
2336 * Given the Plan and a Slice index, find the motion node that is the root of the slice's subtree.

Callers 1

findSenderMotionFunction · 0.85

Calls 1

plan_tree_walkerFunction · 0.85

Tested by

no test coverage detected