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

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rules/FilterJoinRule.java
 ##########
 @@ -329,7 +330,14 @@ 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);
 
 Review comment:
   Rather than extracting out all the inputRefs and compare field count of join 
with the biggest index of inputRefs, shall we just check all the inputRefs by 
RexVisitor and jump out (by throw-catch) when finding an inputRef which has 
index bigger than field count of join. 

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