@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());
}