Plan that will execute a join. The join can be executed either with NestedLoop or HashJoin algorithms This Plan makes a lot of assumptions: limit and offset are already pushed down to left and right plan nodes where clause is already splitted to left and right plan nodes
| 56 | * If sth. else is selected a projection has to reorder those. |
| 57 | */ |
| 58 | public class Join implements ExecutionPlan, ResultDescription { |
| 59 | |
| 60 | private final ExecutionPlan left; |
| 61 | private final ExecutionPlan right; |
| 62 | private final JoinPhase joinPhase; |
| 63 | |
| 64 | private int limit; |
| 65 | private int offset; |
| 66 | private int numOutputs; |
| 67 | |
| 68 | private final int maxRowsPerNode; |
| 69 | @Nullable |
| 70 | private PositionalOrderBy orderBy; |
| 71 | |
| 72 | public Join(JoinPhase joinPhase, |
| 73 | ExecutionPlan left, |
| 74 | ExecutionPlan right, |
| 75 | int limit, |
| 76 | int offset, |
| 77 | int maxRowsPerNode, |
| 78 | int numOutputs, |
| 79 | @Nullable PositionalOrderBy orderBy) { |
| 80 | this.left = left; |
| 81 | this.right = right; |
| 82 | this.joinPhase = joinPhase; |
| 83 | this.limit = limit; |
| 84 | this.offset = offset; |
| 85 | this.maxRowsPerNode = maxRowsPerNode; |
| 86 | this.orderBy = orderBy; |
| 87 | this.numOutputs = numOutputs; |
| 88 | } |
| 89 | |
| 90 | public ExecutionPlan left() { |
| 91 | return left; |
| 92 | } |
| 93 | |
| 94 | public ExecutionPlan right() { |
| 95 | return right; |
| 96 | } |
| 97 | |
| 98 | public JoinPhase joinPhase() { |
| 99 | return joinPhase; |
| 100 | } |
| 101 | |
| 102 | @Override |
| 103 | public ResultDescription resultDescription() { |
| 104 | return this; |
| 105 | } |
| 106 | |
| 107 | @Override |
| 108 | public void setDistributionInfo(DistributionInfo distributionInfo) { |
| 109 | joinPhase.distributionInfo(distributionInfo); |
| 110 | } |
| 111 | |
| 112 | @Override |
| 113 | public <C, R> R accept(ExecutionPlanVisitor<C, R> visitor, C context) { |
| 114 | return visitor.visitJoin(this, context); |
| 115 | } |
nothing calls this directly
no outgoing calls
no test coverage detected