[ 
https://issues.apache.org/jira/browse/HIVE-4960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Phabricator updated HIVE-4960:
------------------------------

    Attachment: HIVE-4960.D11895.1.patch

yhuai requested code review of "HIVE-4960 [jira] lastAlias in 
CommonJoinOperator is not used".

Reviewers: JIRA

first commit

In CommonJoinOperator, there is object called lastAlias. The initial value of 
this object is 'null'. After tracing the usage of this object, I found that 
there is no place to change the value of this object. Also, it is only used in 
processOp in JoinOperator and MapJoinOperator as

if ((lastAlias == null) || (!lastAlias.equals(alias))) {
  nextSz = joinEmitInterval;
}

Since lastAlias will always be null, we will assign joinEmitInterval to nextSz 
every time we get a row. Later in processOp, we have

nextSz = getNextSize(nextSz);

Because we reset the value of nextSz to joinEmitInterval every time we get a 
row, seems that getNextSize will not be used as expected.

TEST PLAN
  EMPTY

REVISION DETAIL
  https://reviews.facebook.net/D11895

AFFECTED FILES
  ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java
  ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
  ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java

MANAGE HERALD RULES
  https://reviews.facebook.net/herald/view/differential/

WHY DID I GET THIS EMAIL?
  https://reviews.facebook.net/herald/transcript/28341/

To: JIRA, yhuai

                
> lastAlias in CommonJoinOperator is not used
> -------------------------------------------
>
>                 Key: HIVE-4960
>                 URL: https://issues.apache.org/jira/browse/HIVE-4960
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Yin Huai
>            Assignee: Yin Huai
>            Priority: Minor
>         Attachments: HIVE-4960.D11895.1.patch
>
>
> In CommonJoinOperator, there is object called lastAlias. The initial value of 
> this object is 'null'. After tracing the usage of this object, I found that 
> there is no place to change the value of this object. Also, it is only used 
> in processOp in JoinOperator and MapJoinOperator as
> {code}
> if ((lastAlias == null) || (!lastAlias.equals(alias))) {
>   nextSz = joinEmitInterval;
> }
> {\code}
> Since lastAlias will always be null, we will assign joinEmitInterval to 
> nextSz every time we get a row. Later in processOp, we have 
> {code}
> nextSz = getNextSize(nextSz);
> {\code}
> Because we reset the value of nextSz to joinEmitInterval every time we get a 
> row, seems that getNextSize will not be used as expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to