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/10/03 01:31:20 UTC

[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #1459: [CALCITE-3347] IndexOutOfBoundsException in FixNullabilityShuttle when using FilterIntoJoinRule

yanlin-Lynn commented on a change in pull request #1459: [CALCITE-3347] IndexOutOfBoundsException in FixNullabilityShuttle when using FilterIntoJoinRule
URL: https://github.com/apache/calcite/pull/1459#discussion_r330834203
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rules/FilterJoinRule.java
 ##########
 @@ -329,7 +330,17 @@ protected void validateJoinFilters(List<RexNode> aboveFilters,
     final Iterator<RexNode> filterIter = joinFilters.iterator();
     while (filterIter.hasNext()) {
       RexNode exp = filterIter.next();
-      if (!predicate.apply(join, joinType, exp)) {
+      int maxIndex = -1;
+      ImmutableList<RexInputRef> inputRefs = RexUtil.getAllInputRef(exp);
+      for (RexInputRef rexInputRef: inputRefs) {
+        if (rexInputRef.getIndex() > maxIndex) {
+          maxIndex = rexInputRef.getIndex();
+        }
+      }
 
 Review comment:
   Agree, that's better.

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