Skip to content

Commit

Permalink
Fix phased execution for merge join
Browse files Browse the repository at this point in the history
visitMergeJoin function was missing from PhasedExecutionSchedule which makes it
throw exceptions when doing phased execution schedule
  • Loading branch information
kewang1024 authored and rschlussel committed May 16, 2022
1 parent 497e3d5 commit 47b1fe3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
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;
Expand Down Expand Up @@ -226,6 +227,12 @@ public Set<PlanFragmentId> visitIndexJoin(IndexJoinNode node, PlanFragmentId cur
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);
Expand Down

0 comments on commit 47b1fe3

Please sign in to comment.