@Override public void prepare(ExecutionPlan p) { if (!(p instanceof JoinExecutionPlan)) { throw new IllegalArgumentException("Not a join plan"); } JoinExecutionPlan joinPlan = (JoinExecutionPlan) p; if (joinPlan.getJoin() != this) { throw new IllegalArgumentException("Not a plan for this join"); } this.plan = joinPlan; applyJoinConditions(); left.prepare(joinPlan.getLeftPlan()); right.prepare(joinPlan.getRightPlan()); }
@Override public void prepare(ExecutionPlan p) { if (!(p instanceof JoinExecutionPlan)) { throw new IllegalArgumentException("Not a join plan"); } JoinExecutionPlan joinPlan = (JoinExecutionPlan) p; if (joinPlan.getJoin() != this) { throw new IllegalArgumentException("Not a plan for this join"); } this.plan = joinPlan; applyJoinConditions(); left.prepare(joinPlan.getLeftPlan()); right.prepare(joinPlan.getRightPlan()); }
@Override public void prepare(ExecutionPlan p) { if (!(p instanceof JoinExecutionPlan)) { throw new IllegalArgumentException("Not a join plan"); } JoinExecutionPlan joinPlan = (JoinExecutionPlan) p; if (joinPlan.getJoin() != this) { throw new IllegalArgumentException("Not a plan for this join"); } this.plan = joinPlan; applyJoinConditions(); left.prepare(joinPlan.getLeftPlan()); right.prepare(joinPlan.getRightPlan()); }
@Override public ExecutionPlan prepare() { if (plan != null) { return plan; } applyJoinConditions(); // the estimated cost is the cost of the left selector, // plus twice the cost of the right selector (we expect // two rows for the right selector for each node // on the left selector) ExecutionPlan leftPlan = left.prepare(); ExecutionPlan rightPlan = right.prepare(); double cost = leftPlan.getEstimatedCost() + 2 * rightPlan.getEstimatedCost(); plan = new JoinExecutionPlan(this, leftPlan, rightPlan, cost); return plan; }
@Override public ExecutionPlan prepare() { if (plan != null) { return plan; } applyJoinConditions(); // the estimated cost is the cost of the left selector, // plus twice the cost of the right selector (we expect // two rows for the right selector for each node // on the left selector) ExecutionPlan leftPlan = left.prepare(); ExecutionPlan rightPlan = right.prepare(); double cost = leftPlan.getEstimatedCost() + 2 * rightPlan.getEstimatedCost(); plan = new JoinExecutionPlan(this, leftPlan, rightPlan, cost); return plan; }
@Override public ExecutionPlan prepare() { if (plan != null) { return plan; } applyJoinConditions(); // the estimated cost is the cost of the left selector, // plus twice the cost of the right selector (we expect // two rows for the right selector for each node // on the left selector) ExecutionPlan leftPlan = left.prepare(); ExecutionPlan rightPlan = right.prepare(); double cost = leftPlan.getEstimatedCost() + 2 * rightPlan.getEstimatedCost(); plan = new JoinExecutionPlan(this, leftPlan, rightPlan, cost); return plan; }