danny0405 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_r300830022
##########
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) {
+ List<RexNode> conjunctions = conjunctions(filter.getCondition());
+ RexBuilder rexBuilder = filter.getCluster().getRexBuilder();
+ for (int i = 0; i < conjunctions.size(); i++) {
Review comment:
final RexBuilder rexBuilder
----------------------------------------------------------------
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