| 2902 | } |
| 2903 | |
| 2904 | static bool |
| 2905 | can_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 |
no test coverage detected