[ https://issues.apache.org/jira/browse/HIVE-27507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744051#comment-17744051 ]
Zhizhen Hou commented on HIVE-27507: ------------------------------------ I tried to submit a patch, it was denied. Can anyone help me? {code:java} houzhizhen@localhost hive % git push --set-upstream origin fixHasOuterJoin ERROR: Permission to apache/hive.git denied to houzhizhen. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. {code} > ConvertJoinMapJoin#hasOuterJoin produce incorrect result > -------------------------------------------------------- > > Key: HIVE-27507 > URL: https://issues.apache.org/jira/browse/HIVE-27507 > Project: Hive > Issue Type: Bug > Components: Query Planning > Reporter: Zhizhen Hou > Assignee: Zhizhen Hou > Priority: Major > > 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. > {code:java} > 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; > } {code} > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)