You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Rohini Palaniswamy (JIRA)" <ji...@apache.org> on 2013/10/01 00:02:26 UTC
[jira] [Commented] (PIG-3490) Inconsistent NULL handling in ABS for
different numeric types
[ https://issues.apache.org/jira/browse/PIG-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782318#comment-13782318 ]
Rohini Palaniswamy commented on PIG-3490:
-----------------------------------------
if (input == null || input.size() < 1 || input.get(0) == null) {
return null;
}
needs to be done instead of
if (input == null || input.size() == 0)
return null;
This needs fixing in a lot of builtin functions not just ABS.
> Inconsistent NULL handling in ABS for different numeric types
> -------------------------------------------------------------
>
> Key: PIG-3490
> URL: https://issues.apache.org/jira/browse/PIG-3490
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.11
> Reporter: Pavel Fedyakov
> Priority: Minor
>
> ABS of NULL either throws NullPointerException or returns NULL. It depends on the numeric type of argument:
> IntAbs, LongAbs, FloatAbs -- fails,
> DoubleAbs -- returns NULL
> It's inconvenient. I'd rather prefer that ABS(NULL) always returns NULL.
--
This message was sent by Atlassian JIRA
(v6.1#6144)