jinxing64 commented on a change in pull request #1300: [CALCITE-3174] IS NOT 
DISTINCT FROM condition pushed from filter to join is not collapsed
URL: https://github.com/apache/calcite/pull/1300#discussion_r300820587
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rules/FilterJoinRule.java
 ##########
 @@ -275,6 +276,28 @@ protected void perform(RelOptRuleCall call, Filter filter,
     call.transformTo(relBuilder.build());
   }
 
+  /**
+   * Get conjunctions of filter's condition but with collapsed
+   * {@code IS NOT DISTINCT FROM} expressions if needed.
+   *
+   * @param filter filter containing condition
+   * @return condition conjunctions with collapsed {@code IS NOT DISTINCT FROM}
+   * expressions if any
+   * @see RelOptUtil#conjunctions(RexNode)
+   */
+  private List<RexNode> getConjunctions(Filter filter) {
 
 Review comment:
   For the Join condition, it seems like we should always remember for 
`collapseExpandedIsNotDistinctFromExpr`. If new rule added, users should do 
this expansion again, just like this PR and 
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/rules/ProjectJoinTransposeRule.java#L92
   I mean that shall we extract such behavior as a shared `RexShuttle`, and 
have an approach to make this expansion automatic ?

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