Search in sources :

Example 1 with DrillScreenRelBase

use of org.apache.drill.exec.planner.common.DrillScreenRelBase in project drill by apache.

the class ScreenPrule method onMatch.

@Override
public void onMatch(RelOptRuleCall call) {
    final DrillScreenRelBase screen = (DrillScreenRelBase) call.rel(0);
    final RelNode input = call.rel(1);
    final RelTraitSet traits = input.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON);
    final RelNode convertedInput = convert(input, traits);
    DrillScreenRelBase newScreen = new ScreenPrel(screen.getCluster(), screen.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON), convertedInput);
    call.transformTo(newScreen);
}
Also used : RelNode(org.apache.calcite.rel.RelNode) DrillScreenRelBase(org.apache.drill.exec.planner.common.DrillScreenRelBase) RelTraitSet(org.apache.calcite.plan.RelTraitSet)

Aggregations

RelTraitSet (org.apache.calcite.plan.RelTraitSet)1 RelNode (org.apache.calcite.rel.RelNode)1 DrillScreenRelBase (org.apache.drill.exec.planner.common.DrillScreenRelBase)1