hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pradeep Kamath (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-355) null checks should be handled more efficiently
Date Fri, 01 Aug 2008 23:15:31 GMT
null checks should be handled more efficiently
----------------------------------------------

                 Key: PIG-355
                 URL: https://issues.apache.org/jira/browse/PIG-355
             Project: Pig
          Issue Type: Bug
    Affects Versions: types_branch
            Reporter: Pradeep Kamath
            Priority: Minor
             Fix For: types_branch


Currently not all operators set Result.returnStatus to POStatus.STATUS_NULL whenever Result.result
== null. The processInput() function in PhysicalOperator itself always sets Result.returnStatus
to POStatus.STATUS_OK whenever input is attached. Due to this, in operators like ADD, there
is code which looks like this:

{code}
res = lhs.getNext(left);
        status = res.returnStatus;
        if(status != POStatus.STATUS_OK || res.result == null) {
            return res;
        }

{code}

If we ensure that all operators set Result.returnStatus to POStatus.STATUS_NULL whenever Result.result
== null, then the extra check in the "if" above can be removed and should help performance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message