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

Allan AvendaƱo updated PIG-2781:
--------------------------------

    Description: 
While I was checking the logical operators, I found that LOSort does this while 
comparing two logical operators:

@Override
public boolean isEqual(Operator other) throws FrontendException {
    if (other != null && other instanceof LOSort) {
        LOSort otherSort = (LOSort)other;
        if (!mAscCols.equals(otherSort.getAscendingCols()))
            return false;
        if (mSortFunc.equals(otherSort.getUserFunc()))
            return false;
        if (mIsStar!=otherSort.isStar())
            return false;
        if (limit!=otherSort.getLimit())
            return false;
        if (mSortColPlans.equals(otherSort.getSortColPlans()))
            return false;
        }
        return checkEquality((LogicalRelationalOperator)other);
    }
} 

if sorting function are equal, it returns false. Also, on the case of same 
sorting columns plans.

  was:
While I was checking the logical operators, I found that LOSort does this while 
comparing two logical operators:

    @Override
    public boolean isEqual(Operator other) throws FrontendException {
      if (other != null && other instanceof LOSort) {
            LOSort otherSort = (LOSort)other;
            if (!mAscCols.equals(otherSort.getAscendingCols()))
                return false;
            if (mSortFunc.equals(otherSort.getUserFunc()))
                return false;
            if (mIsStar!=otherSort.isStar())
                return false;
            if (limit!=otherSort.getLimit())
                return false;
            if (mSortColPlans.equals(otherSort.getSortColPlans()))
                return false;
        }
        return checkEquality((LogicalRelationalOperator)other);
    } 

if sorting function are equal, it returns false. Also, on the case of same 
sorting columns plans.

    
> LOSort isEqual method
> ---------------------
>
>                 Key: PIG-2781
>                 URL: https://issues.apache.org/jira/browse/PIG-2781
>             Project: Pig
>          Issue Type: Bug
>          Components: build
>            Reporter: Allan AvendaƱo
>            Priority: Minor
>
> While I was checking the logical operators, I found that LOSort does this 
> while comparing two logical operators:
> @Override
> public boolean isEqual(Operator other) throws FrontendException {
>     if (other != null && other instanceof LOSort) {
>         LOSort otherSort = (LOSort)other;
>         if (!mAscCols.equals(otherSort.getAscendingCols()))
>             return false;
>         if (mSortFunc.equals(otherSort.getUserFunc()))
>             return false;
>         if (mIsStar!=otherSort.isStar())
>             return false;
>         if (limit!=otherSort.getLimit())
>             return false;
>         if (mSortColPlans.equals(otherSort.getSortColPlans()))
>             return false;
>         }
>         return checkEquality((LogicalRelationalOperator)other);
>     }
> } 
> if sorting function are equal, it returns false. Also, on the case of same 
> sorting columns plans.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to