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

Function can_elide_explicit_motion

src/backend/cdb/cdbpath.c:2904–2922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2902}
2903
2904static bool
2905can_elide_explicit_motion(PlannerInfo *root, Index rti, Path *subpath,
2906 GpPolicy *policy)
2907{
2908 /*
2909 * If there are no Motions between scan of the target relation and here,
2910 * no motion is required.
2911 */
2912 if (bms_is_member(rti, subpath->sameslice_relids))
2913 return true;
2914
2915 if (!CdbPathLocus_IsStrewn(subpath->locus))
2916 {
2917 CdbPathLocus resultrelation_locus = cdbpathlocus_from_policy(root, rti, policy, 0);
2918 return cdbpathlocus_equal(subpath->locus, resultrelation_locus);
2919 }
2920
2921 return false;
2922}
2923
2924/*
2925 * cdbpath_motion_for_parallel_join

Callers 1

Calls 3

bms_is_memberFunction · 0.85
cdbpathlocus_from_policyFunction · 0.85
cdbpathlocus_equalFunction · 0.85

Tested by

no test coverage detected