use of org.apache.drill.exec.planner.logical.DrillLateralJoinRel in project drill by apache.
the class LateralJoinPrule method onMatch.
@Override
public void onMatch(RelOptRuleCall call) {
final DrillLateralJoinRel lateralJoinRel = call.rel(0);
final RelNode left = lateralJoinRel.getLeft();
final RelNode right = lateralJoinRel.getRight();
RelTraitSet traitsLeft = left.getTraitSet().plus(Prel.DRILL_PHYSICAL);
RelTraitSet traitsRight = right.getTraitSet().plus(Prel.DRILL_PHYSICAL);
RelTraitSet corrTraits = traitsLeft.plus(DrillDistributionTrait.RANDOM_DISTRIBUTED);
final RelNode convertedLeft = convert(left, traitsLeft);
final RelNode convertedRight = convert(right, traitsRight);
final LateralJoinPrel lateralJoinPrel = new LateralJoinPrel(lateralJoinRel.getCluster(), corrTraits, convertedLeft, convertedRight, lateralJoinRel.excludeCorrelateColumn, lateralJoinRel.getCorrelationId(), lateralJoinRel.getRequiredColumns(), lateralJoinRel.getJoinType());
call.transformTo(lateralJoinPrel);
}
Aggregations