super(RelOptHelper.any(DrillLimitRel.class, DrillRel.DRILL_LOGICAL), "Prel.LimitPrule");
}
@Override
public void onMatch(RelOptRuleCall call) {
final DrillLimitRel limit = (DrillLimitRel) call.rel(0);
final RelNode input = limit.getChild();
final RelTraitSet traits = input.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON);
final RelNode convertedInput = convert(input, traits);
LimitPrel newLimit = new LimitPrel(limit.getCluster(), limit.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON), convertedInput, limit.getOffset(), limit.getFetch());
call.transformTo(newLimit);
}