[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #2013: [CALCITE-3935] Materialization-Failed, when querying with LeftJoinWithFilter

2020-06-27 Thread GitBox


yanlin-Lynn commented on a change in pull request #2013:
URL: https://github.com/apache/calcite/pull/2013#discussion_r446513799



##
File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
##
@@ -2011,6 +2006,38 @@ public static boolean equalType(String desc0, MutableRel 
rel0, String desc1,
 return RelOptUtil.equal(desc0, rel0.rowType, desc1, rel1.rowType, litmus);
   }
 
+  /**
+   * Check filter bottom join can be pull-up,

Review comment:
   Check if filter under join can be pulled up





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




[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #2013: [CALCITE-3935] Materialization-Failed, when querying with LeftJoinWithFilter

2020-06-27 Thread GitBox


yanlin-Lynn commented on a change in pull request #2013:
URL: https://github.com/apache/calcite/pull/2013#discussion_r446513643



##
File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
##
@@ -2011,6 +2006,38 @@ public static boolean equalType(String desc0, MutableRel 
rel0, String desc1,
 return RelOptUtil.equal(desc0, rel0.rowType, desc1, rel1.rowType, litmus);
   }
 
+  /**
+   * Check filter bottom join can be pull-up,
+   * when meeting JoinOnCalc of query unify to Join of target.
+   * Such as {@link JoinOnLeftCalcToJoinUnifyRule} 
+   * {@link JoinOnRightCalcToJoinUnifyRule} 
+   * {@link JoinOnCalcsToJoinUnifyRule} 
+   */
+  private static boolean canPullUpFilterBottomJoin(JoinRelType joinType,
+   RexNode leftFilterRexNode,
+   RexNode rightFilterRexNode) 
{

Review comment:
   we do not format like this





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