use of org.apache.drill.exec.planner.physical.UnionPrel in project drill by apache.
the class FinalColumnReorderer method visitPrel.
@Override
public Prel visitPrel(Prel prel, Void value) throws RuntimeException {
if (prel instanceof UnionPrel) {
return addColumnOrderingBelowUnion(prel);
}
List<RelNode> children = Lists.newArrayList();
boolean changed = false;
for (Prel p : prel) {
Prel newP = p.accept(this, null);
if (newP != p) {
changed = true;
}
children.add(newP);
}
if (changed) {
return (Prel) prel.copy(prel.getTraitSet(), children);
} else {
return prel;
}
}
Aggregations