use of org.apache.drill.exec.planner.physical.JoinPrel in project drill by apache.
the class JoinPrelRenameVisitor method visitJoin.
@Override
public Prel visitJoin(JoinPrel prel, Void value) throws RuntimeException {
List<RelNode> children = Lists.newArrayList();
for (Prel child : prel) {
child = child.accept(this, null);
children.add(child);
}
final int leftCount = children.get(0).getRowType().getFieldCount();
List<RelNode> reNamedChildren = Lists.newArrayList();
RelNode left = prel.getJoinInput(0, children.get(0));
RelNode right = prel.getJoinInput(leftCount, children.get(1));
reNamedChildren.add(left);
reNamedChildren.add(right);
return (Prel) prel.copy(prel.getTraitSet(), reNamedChildren);
}