[
https://issues.apache.org/jira/browse/PIG-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967607#comment-15967607
]
Koji Noguchi commented on PIG-5201:
-----------------------------------
{quote}
bq. To me, if Flatten(empty-bag) is defined to drop, FLATTEN(null-bag) should
also do the same.
I don't think we should do that as existing scripts will end up losing more
records.
{quote}
Dropping on FLATTEN(empty-bag) is a documented behavior.
I don't see any reasons FLATTEN(null-bag) to behave differently.
Also, not sure how many users depend on the current {{FLATTEN(null) = null}}
given it corrupts the output in most cases. (It incorrectly shifts the fields
like described in PIG-2537)
> Null handling on FLATTEN
> ------------------------
>
> Key: PIG-5201
> URL: https://issues.apache.org/jira/browse/PIG-5201
> Project: Pig
> Issue Type: Bug
> Reporter: Koji Noguchi
> Assignee: Koji Noguchi
> Priority: Minor
> Attachments: pig-5201-v00-testonly.patch, pig-5201-v01.patch,
> pig-5201-v02.patch
>
>
> Sometimes, FLATTEN(null) or FLATTEN(bag-with-null) seem to produce incorrect
> results.
> Test code/script to follow.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)