Fix phased execution for merge join
visitMergeJoin function was missing from PhasedExecutionSchedule which makes it
throw exceptions when doing phased execution schedule
@@ -22,6 +22,7 @@ import com.facebook.presto.sql.planner.plan.ExchangeNode;
import com.facebook.presto.sql.planner.plan.IndexJoinNode;
import com.facebook.presto.sql.planner.plan.InternalPlanVisitor;
import com.facebook.presto.sql.planner.plan.JoinNode;
+import com.facebook.presto.sql.planner.plan.MergeJoinNode;
import com.facebook.presto.sql.planner.plan.PlanFragmentId;
import com.facebook.presto.sql.planner.plan.RemoteSourceNode;
import com.facebook.presto.sql.planner.plan.SemiJoinNode;
@@ -226,6 +227,12 @@ public class PhasedExecutionSchedule
return processJoin(node.getIndexSource(), node.getProbeSource(), currentFragmentId);
}
+ @Override
+ public Set<PlanFragmentId> visitMergeJoin(MergeJoinNode node, PlanFragmentId currentFragmentId)
+ {
+ return processJoin(node.getRight(), node.getLeft(), currentFragmentId);
+ }
+
private Set<PlanFragmentId> processJoin(PlanNode build, PlanNode probe, PlanFragmentId currentFragmentId)
{
Set<PlanFragmentId> buildSources = build.accept(this, currentFragmentId);
