use of org.apache.drill.exec.planner.physical.MetadataControllerPrel in project drill by apache.
the class StarColumnConverter method visitPrel.
@Override
public Prel visitPrel(Prel prel, Void value) throws RuntimeException {
if (prel instanceof MetadataControllerPrel) {
// disallow renaming projections for analyze command
return prel;
}
// Require prefix rename : there exists other expression, in addition to a star column.
if (// not set yet.
!prefixedForStar && StarColumnHelper.containsStarColumn(prel.getRowType()) && prel.getRowType().getFieldNames().size() > 1) {
prefixedForStar = true;
}
List<RelNode> children = Lists.newArrayList();
for (Prel child : prel) {
child = child.accept(this, null);
children.add(child);
}
return (Prel) prel.copy(prel.getTraitSet(), children);
}
Aggregations