Skip to content

Commit

Permalink
Add missing MergeJoinNode visit methods
Browse files Browse the repository at this point in the history
  • Loading branch information
adkri authored and highker committed Apr 6, 2022
1 parent 46af092 commit 5589e6d
Show file tree
Hide file tree
Showing 2 changed files with 21 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 @@ -139,6 +140,14 @@ public Void visitJoin(JoinNode node, Void context)
return null;
}

@Override
public Void visitMergeJoin(MergeJoinNode node, Void context)
{
node.getRight().accept(this, context);
node.getLeft().accept(this, context);
return null;
}

@Override
public Void visitSemiJoin(SemiJoinNode node, Void context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,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.MetadataDeleteNode;
import com.facebook.presto.sql.planner.plan.OutputNode;
import com.facebook.presto.sql.planner.plan.RemoteSourceNode;
Expand Down Expand Up @@ -176,6 +177,17 @@ public Map<PlanNodeId, SplitSource> visitJoin(JoinNode node, Context context)
.build();
}

@Override
public Map<PlanNodeId, SplitSource> visitMergeJoin(MergeJoinNode node, Context context)
{
Map<PlanNodeId, SplitSource> leftSplits = node.getLeft().accept(this, context);
Map<PlanNodeId, SplitSource> rightSplits = node.getRight().accept(this, context);
return ImmutableMap.<PlanNodeId, SplitSource>builder()
.putAll(leftSplits)
.putAll(rightSplits)
.build();
}

@Override
public Map<PlanNodeId, SplitSource> visitSemiJoin(SemiJoinNode node, Context context)
{
Expand Down

0 comments on commit 5589e6d

Please sign in to comment.