pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitriy V. Ryaboy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PIG-2915) Builtin TOP udf is sensitive to null input bags
Date Wed, 12 Sep 2012 15:52:07 GMT

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

Dmitriy V. Ryaboy updated PIG-2915:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.11
           Status: Resolved  (was: Patch Available)
    
> Builtin TOP udf is sensitive to null input bags
> -----------------------------------------------
>
>                 Key: PIG-2915
>                 URL: https://issues.apache.org/jira/browse/PIG-2915
>             Project: Pig
>          Issue Type: Improvement
>          Components: internal-udfs
>    Affects Versions: 0.11
>            Reporter: Andy Schlaikjer
>            Assignee: Andy Schlaikjer
>             Fix For: 0.11
>
>         Attachments: pig-null_safe_top.1.patch, pig-null_safe_top.2.patch
>
>
> TOP(max, sortField, inputBag) is sensitive to null inputBag arguments.
> In some cases it is preferable for a UDF to simply return null for null inputs e.g. to
avoid conditional logic in a script.
> Most of the UDFs I write act this way, but TOP does not. This patch updates TOP to return
null in the case where all input bags are null. Unit tests are included to confirm expected
behavior.

--
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

Mime
View raw message