rel.getJoinType(), rel.isSemiJoinDone()); return newJoin;
rel.getJoinType(), rel.isSemiJoinDone()); return newJoin;
newOp = join.copy(join.getTraitSet(), join.getCondition(), newInputs.get(0), newInputs.get(1), join.getJoinType(), join.isSemiJoinDone()); } else { return;
@Override public void onMatch(RelOptRuleCall call) { final Join join = call.rel(0); final RexBuilder rexBuilder = join.getCluster().getRexBuilder(); final RexNode condition = RexUtil.pullFactors(rexBuilder, join.getCondition()); RexNode newCondition = analyzeRexNode(rexBuilder, condition); // If we could not transform anything, we bail out if (newCondition.toString().equals(condition.toString())) { return; } RelNode newNode = join.copy(join.getTraitSet(), newCondition, join.getLeft(), join.getRight(), join.getJoinType(), join.isSemiJoinDone()); call.transformTo(newNode); } }
newOp = join.copy(join.getTraitSet(), join.getCondition(), newInputs.get(0), newInputs.get(1), join.getJoinType(), join.isSemiJoinDone()); } else { return;
lChild, rChild, join.getJoinType(), join.isSemiJoinDone()); call.getPlanner().onCopy(join, newJoin);
rightProjRel, join.getJoinType(), join.isSemiJoinDone());
lChild, rChild, join.getJoinType(), join.isSemiJoinDone()); call.getPlanner().onCopy(join, newJoin);
join.getVariablesStopped(), join.isSemiJoinDone());
lChild, rChild, join.getJoinType(), join.isSemiJoinDone()); call.getPlanner().onCopy(join, newRel);
lChild, rChild, join.getJoinType(), join.isSemiJoinDone()); call.getPlanner().onCopy(join, newRel);
@Override public final Join copy(RelTraitSet traitSet, List<RelNode> inputs) { assert inputs.size() == 2; return copy(traitSet, getCondition(), inputs.get(0), inputs.get(1), joinType, isSemiJoinDone()); }
@Override public final Join copy(RelTraitSet traitSet, List<RelNode> inputs) { assert inputs.size() == 2; return copy(traitSet, getCondition(), inputs.get(0), inputs.get(1), joinType, isSemiJoinDone()); }
@Override public RelNode accept(RexShuttle shuttle) { RexNode condition = shuttle.apply(this.condition); if (this.condition == condition) { return this; } return copy(traitSet, condition, left, right, joinType, isSemiJoinDone()); }
@Override public RelNode accept(RexShuttle shuttle) { RexNode condition = shuttle.apply(this.condition); if (this.condition == condition) { return this; } return copy(traitSet, condition, left, right, joinType, isSemiJoinDone()); }
public void onMatch(RelOptRuleCall call) { final Delta delta = call.rel(0); Util.discard(delta); final Join join = call.rel(1); final RelNode left = join.getLeft(); final RelNode right = join.getRight(); final LogicalDelta rightWithDelta = LogicalDelta.create(right); final LogicalJoin joinL = LogicalJoin.create(left, rightWithDelta, join.getCondition(), join.getVariablesSet(), join.getJoinType(), join.isSemiJoinDone(), ImmutableList.copyOf(join.getSystemFieldList())); final LogicalDelta leftWithDelta = LogicalDelta.create(left); final LogicalJoin joinR = LogicalJoin.create(leftWithDelta, right, join.getCondition(), join.getVariablesSet(), join.getJoinType(), join.isSemiJoinDone(), ImmutableList.copyOf(join.getSystemFieldList())); List<RelNode> inputsToUnion = new ArrayList<>(); inputsToUnion.add(joinL); inputsToUnion.add(joinR); final LogicalUnion newNode = LogicalUnion.create(inputsToUnion, true); call.transformTo(newNode); } }
public void onMatch(RelOptRuleCall call) { final Delta delta = call.rel(0); Util.discard(delta); final Join join = call.rel(1); final RelNode left = join.getLeft(); final RelNode right = join.getRight(); final LogicalDelta rightWithDelta = LogicalDelta.create(right); final LogicalJoin joinL = LogicalJoin.create(left, rightWithDelta, join.getCondition(), join.getVariablesSet(), join.getJoinType(), join.isSemiJoinDone(), ImmutableList.copyOf(join.getSystemFieldList())); final LogicalDelta leftWithDelta = LogicalDelta.create(left); final LogicalJoin joinR = LogicalJoin.create(leftWithDelta, right, join.getCondition(), join.getVariablesSet(), join.getJoinType(), join.isSemiJoinDone(), ImmutableList.copyOf(join.getSystemFieldList())); List<RelNode> inputsToUnion = new ArrayList<>(); inputsToUnion.add(joinL); inputsToUnion.add(joinR); final LogicalUnion newNode = LogicalUnion.create(inputsToUnion, true); call.transformTo(newNode); } }
lChild, rChild, join.getJoinType(), join.isSemiJoinDone()); call.getPlanner().onCopy(join, newRel);
lChild, rChild, join.getJoinType(), join.isSemiJoinDone()); call.getPlanner().onCopy(join, newRel);
join.getRight(), join.getJoinType(), join.isSemiJoinDone());