You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Pradeep Kamath (JIRA)" <ji...@apache.org> on 2008/08/02 01:15:31 UTC

[jira] Created: (PIG-355) null checks should be handled more efficiently

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.