You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by el...@apache.org on 2016/05/31 23:24:03 UTC
[05/14] calcite git commit: [CALCITE-1246] Cleanup duplicate
variables in JoinPushThroughJoinRule (Yi Xinglu)
[CALCITE-1246] Cleanup duplicate variables in JoinPushThroughJoinRule (Yi Xinglu)
Also, fix typo in comment.
Close apache/calcite#234
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/b6f0e102
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/b6f0e102
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/b6f0e102
Branch: refs/heads/branch-avatica-1.8
Commit: b6f0e1021b8d8e0dc08e6da49391a76cdb6cfb14
Parents: 5a697ee
Author: yixinglu <yx...@gmail.com>
Authored: Thu May 19 21:07:18 2016 +0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Sun May 22 12:46:46 2016 -0700
----------------------------------------------------------------------
.../calcite/rel/rules/JoinPushThroughJoinRule.java | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/b6f0e102/core/src/main/java/org/apache/calcite/rel/rules/JoinPushThroughJoinRule.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/JoinPushThroughJoinRule.java b/core/src/main/java/org/apache/calcite/rel/rules/JoinPushThroughJoinRule.java
index 402557d..5894130 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/JoinPushThroughJoinRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/JoinPushThroughJoinRule.java
@@ -169,11 +169,7 @@ public class JoinPushThroughJoinRule extends RelOptRule {
final List<RexNode> newBottomList = new ArrayList<>();
new RexPermuteInputsShuttle(bottomMapping, relA, relC)
.visitList(nonIntersecting, newBottomList);
- final Mappings.TargetMapping bottomBottomMapping =
- Mappings.createShiftMapping(
- aCount + bCount,
- 0, 0, aCount);
- new RexPermuteInputsShuttle(bottomBottomMapping, relA, relC)
+ new RexPermuteInputsShuttle(bottomMapping, relA, relC)
.visitList(bottomNonIntersecting, newBottomList);
final RexBuilder rexBuilder = cluster.getRexBuilder();
RexNode newBottomCondition =
@@ -259,7 +255,7 @@ public class JoinPushThroughJoinRule extends RelOptRule {
}
// Split the condition of bottomJoin into a conjunction. Each of the
- // parts that use columns from B will need to be pulled up.
+ // parts that use columns from A will need to be pulled up.
final List<RexNode> bottomIntersecting = new ArrayList<>();
final List<RexNode> bottomNonIntersecting = new ArrayList<>();
split(
@@ -276,12 +272,7 @@ public class JoinPushThroughJoinRule extends RelOptRule {
final List<RexNode> newBottomList = new ArrayList<>();
new RexPermuteInputsShuttle(bottomMapping, relC, relB)
.visitList(nonIntersecting, newBottomList);
- final Mappings.TargetMapping bottomBottomMapping =
- Mappings.createShiftMapping(
- aCount + bCount + cCount,
- 0, aCount + bCount, cCount,
- cCount, aCount, bCount);
- new RexPermuteInputsShuttle(bottomBottomMapping, relC, relB)
+ new RexPermuteInputsShuttle(bottomMapping, relC, relB)
.visitList(bottomNonIntersecting, newBottomList);
final RexBuilder rexBuilder = cluster.getRexBuilder();
RexNode newBottomCondition =