bestPlanSinks.add((SinkPlanNode) bestPlanRoot);
} else if (bestPlanRoot instanceof SinkJoinerPlanNode) {
((SinkJoinerPlanNode) bestPlanRoot).getDataSinks(bestPlanSinks);
}
DeadlockPreventer dp = new DeadlockPreventer();
dp.resolveDeadlocks(bestPlanSinks);
// finalize the plan
OptimizedPlan plan = new PlanFinalizer().createFinalPlan(bestPlanSinks, program.getJobName(), program);
// swap the binary unions for n-ary unions. this changes no strategies or memory consumers whatsoever, so