Skip to content

Commit 07a0b20

Browse files
committed
Add javadoc
1 parent c209f02 commit 07a0b20

File tree

1 file changed

+9
-0
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner

1 file changed

+9
-0
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/PlannerUtils.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@
6969

7070
public 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 -> {

0 commit comments

Comments
 (0)