Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/384#discussion_r26644814
  
    --- Diff: 
tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/FilterPushDownRule.java
 ---
    @@ -355,20 +230,144 @@ public LogicalNode visitJoin(FilterPushDownContext 
context, LogicalPlan plan, Lo
           if (joinNode.getJoinType() == JoinType.CROSS) {
             joinNode.setJoinType(JoinType.INNER);
           }
    -      context.pushingDownFilters.removeAll(matched);
         }
     
    -    
context.pushingDownFilters.addAll(outerJoinFilterEvalsExcludePredication);
    -    context.pushingDownFilters.addAll(thetaJoinFilter);
    +    context.pushingDownFilters.removeAll(matched);
         return joinNode;
       }
     
    +  private static Set<EvalNode> extractNonPushableJoinQuals(final 
LogicalPlan plan,
    +                                                           final 
LogicalPlan.QueryBlock block,
    +                                                           final JoinNode 
joinNode,
    +                                                           final 
Set<EvalNode> onPredicates,
    +                                                           final 
Set<EvalNode> wherePredicates)
    +      throws PlanningException {
    +    Set<EvalNode> nonPushableQuals = TUtil.newHashSet();
    +    // TODO: non-equi theta join quals must not be pushed until TAJO-742 
is resolved.
    +    nonPushableQuals.addAll(extractNonEquiThetaJoinQuals(wherePredicates, 
block, joinNode));
    +
    +    // for outer joins
    +    if (PlannerUtil.isOuterJoin(joinNode.getJoinType())) {
    +      nonPushableQuals.addAll(extractNonPushableOuterJoinQuals(plan, 
onPredicates, wherePredicates, joinNode));
    +    }
    +    return nonPushableQuals;
    +  }
    +
    +  /**
    +   * For outer joins, pushable predicates can be decided based on their 
locations in the SQL and types of referencing relations.
    --- End diff --
    
    It seems to exceed 120 columns.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to