Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Now, the hasOuterJoin returns whether the last join condition is outer join.
If hast join condition is not outer join, it returns false reglardless there is outer join.
private boolean hasOuterJoin(JoinOperator joinOp) throws SemanticException { boolean hasOuter = false; for (JoinCondDesc joinCondDesc : joinOp.getConf().getConds()) { switch (joinCondDesc.getType()) { case JoinDesc.INNER_JOIN: case JoinDesc.LEFT_SEMI_JOIN: case JoinDesc.UNIQUE_JOIN: hasOuter = false; break; case JoinDesc.FULL_OUTER_JOIN: case JoinDesc.LEFT_OUTER_JOIN: case JoinDesc.RIGHT_OUTER_JOIN: hasOuter = true; break; default: throw new SemanticException("Unknown join type " + joinCondDesc.getType()); } } return hasOuter; }
There may be two solutions.
1. Short circuit if found outer join and return true;
2. Delete 'hasOuter = false;' if join type is not outer join and loop through all join conditions.
Attachments
Issue Links
- links to