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

Function cdbllize_adjust_init_plan_path

src/backend/cdb/cdbllize.c:672–690  ·  view source on GitHub ↗

* cdbllize_adjust_init_plan_path -- Adjust Init Plan's Path for MPP * * Init Plans are dispatched and executed before the main query. Adjust the * Path to bring the result back to the QD. */

Source from the content-addressed store, hash-verified

670 * Path to bring the result back to the QD.
671 */
672Path *
673cdbllize_adjust_init_plan_path(PlannerInfo *root, Path *best_path)
674{
675 CdbPathLocus entryLocus;
676
677 CdbPathLocus_MakeEntry(&entryLocus);
678
679 /*
680 * In a Motion to Entry locus, the numsegments indicates the
681 * number of segments in the *sender*.
682 */
683 entryLocus.numsegments = best_path->locus.numsegments;
684
685 return cdbpath_create_motion_path(root,
686 best_path,
687 root->sort_pathkeys,
688 false,
689 entryLocus);
690}
691
692/*
693 * cdbllize_decorate_subplans_with_motions - Adjust subplans for MPP.

Callers 2

make_subplanFunction · 0.85
create_minmaxagg_planFunction · 0.85

Calls 1

Tested by

no test coverage detected