File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 6969
7070public class PlannerUtils {
7171
72+ /**
73+ * When the plan contains children like {@code MergeExec} resulted from the planning of commands such as FORK,
74+ * we need to break the plan into sub plans and a main coordinator plan.
75+ * The result pages from each sub plan will be funneled to the main coordinator plan.
76+ * To achieve this, we wire each sub plan with a {@code ExchangeSinkExec} and add a {@code ExchangeSourceExec}
77+ * to the main coordinator plan.
78+ * There is an additional split of each sub plan into a data node plan and coordinator plan.
79+ * This split is not done here, but as part of {@code PlannerUtils#breakPlanBetweenCoordinatorAndDataNode}.
80+ */
7281 public static Tuple <List <PhysicalPlan >, PhysicalPlan > breakPlanIntoSubPlansAndMainPlan (PhysicalPlan plan ) {
7382 var subplans = new Holder <List <PhysicalPlan >>();
7483 PhysicalPlan mainPlan = plan .transformUp (MergeExec .class , me -> {
You can’t perform that action at this time.
0 commit comments