[
https://issues.apache.org/jira/browse/PIG-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052113#comment-13052113
]
Alan Gates commented on PIG-2132:
---------------------------------
I know I said in the mail thread that these functions should ignore null. But
I missed the context and thought we were talking about the aggregate functions
MIN and MAX. Sorry for the misunderstanding.
In the case of these we need to think about the semantics we want. It seems to
me that MIN(x, null) should return null rather than x, because you don't know
the answer, which is what null means.
> Piggybank: MIN and MAX functions should ignore nulls
> ----------------------------------------------------
>
> Key: PIG-2132
> URL: https://issues.apache.org/jira/browse/PIG-2132
> Project: Pig
> Issue Type: Bug
> Components: tools
> Reporter: Jonathan Coveney
> Priority: Minor
> Attachments: JcoMaxMinPatch.patch, JcoMaxMinPatch_wtests.patch
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> org.apache.pig.piggybank.evaluation.math.MAX and
> org.apache.pig.piggybank.evaluation.math.MIN throws a NullPointerException on
> a null input, when it should just ignore it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira