use of org.apache.drill.exec.planner.physical.Prel 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;
}
}
use of org.apache.drill.exec.planner.physical.Prel in project drill by apache.
the class PrelVisualizerVisitor method visitChildren.
private void visitChildren(Prel prel, VisualizationState value) throws Exception {
value.indent();
value.out.append("children = [\n");
value.push();
for (Prel child : prel) {
child.accept(this, value);
}
value.pop();
value.indent();
value.out.append("]\n");
}
Aggregations