You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/11/28 02:26:57 UTC

[GitHub] [calcite] wenhuitang commented on a change in pull request #1462: [CALCITE-3353]ProjectJoinTransposeRule caused AssertionError when creating a new Join

wenhuitang 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_r351569326
 
 

 ##########
 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:
   ok, sorry too late to reply, Are there any format requirements for adding this note?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services