zabetak commented on a change in pull request #1462: 
[CALCITE-3353]ProjectJoinTransposeRule caused AssertionError when creating a 
new Join
URL: https://github.com/apache/calcite/pull/1462#discussion_r333492830
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rules/ProjectJoinTransposeRule.java
 ##########
 @@ -19,29 +19,40 @@
 import org.apache.calcite.plan.RelOptRule;
 import org.apache.calcite.plan.RelOptRuleCall;
 import org.apache.calcite.plan.RelOptUtil;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelCollation;
+import org.apache.calcite.rel.RelCollationTraitDef;
+import org.apache.calcite.rel.RelCollations;
+import org.apache.calcite.rel.RelFieldCollation;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.core.Join;
 import org.apache.calcite.rel.core.Project;
 import org.apache.calcite.rel.core.RelFactories;
+import org.apache.calcite.rel.logical.LogicalJoin;
+import org.apache.calcite.rel.logical.LogicalProject;
 import org.apache.calcite.rel.type.RelDataTypeField;
 import org.apache.calcite.rex.RexCall;
 import org.apache.calcite.rex.RexNode;
 import org.apache.calcite.rex.RexOver;
 import org.apache.calcite.rex.RexShuttle;
+import org.apache.calcite.rex.RexUtil;
 import org.apache.calcite.tools.RelBuilderFactory;
+import org.apache.calcite.util.mapping.Mappings;
 
 import java.util.ArrayList;
 import java.util.List;
 
 /**
- * Planner rule that pushes a {@link org.apache.calcite.rel.core.Project}
- * past a {@link org.apache.calcite.rel.core.Join}
+ * Planner rule that pushes a {@link 
org.apache.calcite.rel.logical.LogicalProject}
+ * past a {@link org.apache.calcite.rel.logical.LogicalJoin}
  * by splitting the projection into a projection on top of each child of
  * the join.
  */
 public class ProjectJoinTransposeRule extends RelOptRule {
   public static final ProjectJoinTransposeRule INSTANCE =
-      new ProjectJoinTransposeRule(expr -> !(expr instanceof RexOver),
+      new ProjectJoinTransposeRule(
 
 Review comment:
   Add a small backward compatibility note in `history.md` regarding this 
change in the default behavior of the rule.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to