Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/384#discussion_r26089560
--- Diff: tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
---
@@ -1978,26 +1979,18 @@ public static boolean
checkIfBeEvaluatedAtJoin(QueryBlock block, EvalNode evalNo
return false;
}
- // When a 'case-when' is used with outer join, the case-when
expression must be evaluated
- // at the topmost join operator.
- // TODO - It's also valid that case-when is evalauted at the topmost
outer operator.
- // But, how can we know there is no further outer join operator
after this node?
- if (containsOuterJoin(block)) {
- if (!isTopMostJoin) {
- Collection<EvalNode> found =
EvalTreeUtil.findOuterJoinSensitiveEvals(evalNode);
- if (found.size() > 0) {
- return false;
- }
- }
+ /*
+ * For outer joins, only predicates which are specified at the on
clause can be evaluated during processing join.
+ * Other predicates from the where clause must be evaluated after the
join.
+ * The below code will be modified after improving join operators to
keep join filters by themselves (TAJO-1310).
+ */
+ if (PlannerUtil.isOuterJoin(node.getJoinType()) && !isOnPredicate) {
--- End diff --
Could explain your intension about this change? It would be great if I can
hear what the problem (or motivation) is and what your solution is.
---
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.
---