Java Code Examples for org.apache.calcite.plan.RelOptUtil#pushDownJoinConditions()
The following examples show how to use
org.apache.calcite.plan.RelOptUtil#pushDownJoinConditions() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JoinPushExpressionsRule.java From Bats with Apache License 2.0 | 6 votes |
@Override public void onMatch(RelOptRuleCall call) { Join join = call.rel(0); // Push expression in join condition into Project below Join. RelNode newJoin = RelOptUtil.pushDownJoinConditions(join, call.builder()); // If the join is the same, we bail out if (newJoin instanceof Join) { final RexNode newCondition = ((Join) newJoin).getCondition(); if (join.getCondition().equals(newCondition)) { return; } } call.transformTo(newJoin); }
Example 2
Source File: FlinkJoinPushExpressionsRule.java From flink with Apache License 2.0 | 6 votes |
@Override public void onMatch(RelOptRuleCall call) { Join join = call.rel(0); // Push expression in join condition into Project below Join. RelNode newJoin = RelOptUtil.pushDownJoinConditions(join, call.builder()); // If the join is the same, we bail out if (newJoin instanceof Join) { final RexNode newCondition = ((Join) newJoin).getCondition(); if (join.getCondition().equals(newCondition)) { return; } } call.transformTo(newJoin); }
Example 3
Source File: JoinPushExpressionsRule.java From calcite with Apache License 2.0 | 6 votes |
@Override public void onMatch(RelOptRuleCall call) { Join join = call.rel(0); // Push expression in join condition into Project below Join. RelNode newJoin = RelOptUtil.pushDownJoinConditions(join, call.builder()); // If the join is the same, we bail out if (newJoin instanceof Join) { final RexNode newCondition = ((Join) newJoin).getCondition(); if (join.getCondition().equals(newCondition)) { return; } } call.transformTo(newJoin); }