super(RelOptHelper.some(DrillProjectRel.class, RelOptHelper.any(RelNode.class)), "ProjectPrule");
}
@Override
public void onMatch(RelOptRuleCall call) {
final DrillProjectRel project = (DrillProjectRel) call.rel(0);
final RelNode input = project.getChild();
RelTraitSet traits = input.getTraitSet().plus(Prel.DRILL_PHYSICAL);
RelNode convertedInput = convert(input, traits);
Map<Integer, Integer> inToOut = getProjectMap(project);
boolean traitPull = new ProjectTraitPull(call, inToOut).go(project, convertedInput);
if(!traitPull){
call.transformTo(new ProjectPrel(project.getCluster(), convertedInput.getTraitSet(), convertedInput, project.getProjects(), project.getRowType()));
}
}