pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheolsoo Park (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PIG-2929) CONCAT returns null when 1 items is null
Date Mon, 24 Sep 2012 18:03:07 GMT

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

Cheolsoo Park updated PIG-2929:
-------------------------------

    Attachment: PIG-2929.patch

Thank you very much for reporting an issue Nicholas!

In fact, this is documented [here|http://pig.apache.org/docs/r0.10.0/basic.html#nulls] although
it is not very visible.

I am attaching a patch that updats the built-in function doc (including CONCAT, AVG, MIN,
MAX, and SIZE) regarding nulls.

Regarding your suggestion of changing the behavior of CONCAT, even though it is total valid,
I'm afraid that that could introduce backward incompatibilities. That is, some people may
rely on that CONCAT returns nulls in their scripts. Given that this can be easily achieved
by writing your own UDF, I prefer to keep the current behavior.

Please let me know if anyone thinks otherwise. Thanks! 
                
> CONCAT returns null when 1 items is null
> ----------------------------------------
>
>                 Key: PIG-2929
>                 URL: https://issues.apache.org/jira/browse/PIG-2929
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, internal-udfs
>    Affects Versions: 0.9.0, 0.9.1, 0.9.2
>            Reporter: Nicholas Verbeck
>             Fix For: 0.11
>
>         Attachments: PIG-2929.patch
>
>
> Just stumbled upon this issue over the weekend. It appears the built-in CONCAT function
will return null in the advent of 1 item in the Tuple being null. If this is as intended it
would be nice if the docs made note of this. Otherwise it would be nice if nulls where just
skipped and a proper string of what was left was returned. If all items are null then just
return null in that case.

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