* Given the Plan and a Slice index, find the motion node that is the root of the slice's subtree. */
| 2336 | * Given the Plan and a Slice index, find the motion node that is the root of the slice's subtree. |
| 2337 | */ |
| 2338 | Motion *findSenderMotion(PlannedStmt *plannedstmt, int sliceIndex) |
| 2339 | { |
| 2340 | Assert(sliceIndex > -1); |
| 2341 | |
| 2342 | Plan *planTree = plannedstmt->planTree; |
| 2343 | MotionFinderContext ctx; |
| 2344 | ctx.base.node = (Node*)plannedstmt; |
| 2345 | ctx.motionId = sliceIndex; |
| 2346 | ctx.motion = NULL; |
| 2347 | MotionFinderWalker(planTree, &ctx); |
| 2348 | return ctx.motion; |
| 2349 | } |
| 2350 | |
| 2351 | typedef struct SubPlanFinderContext |
| 2352 | { |
no test coverage detected