You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2015/04/29 01:16:06 UTC

[jira] [Updated] (PIG-3368) doc pig flatten operator applied to empty vs null bag

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

Daniel Dai updated PIG-3368:
----------------------------
    Fix Version/s:     (was: 0.15.0)
                   0.16.0

> doc pig flatten operator applied to empty vs null bag
> -----------------------------------------------------
>
>                 Key: PIG-3368
>                 URL: https://issues.apache.org/jira/browse/PIG-3368
>             Project: Pig
>          Issue Type: Improvement
>          Components: documentation
>            Reporter: Andy Schlaikjer
>            Assignee: Aniket Mokashi
>             Fix For: 0.16.0
>
>
> [Pig docs|http://pig.apache.org/docs/r0.11.0/basic.html#flatten] state that FLATTEN(field_of_type_bag) may generate a cross-product in the case when an additional field is projected, e.g.:
> y = FOREACH x GENERATE f1, FLATTEN(fbag) as f2;
> Additionally, for records in x for which fbag is empty (not null), no output record is generated.
> What is expected behavior when fbag is null?
> Some users might expect similar behavior, but FLATTEN actually passes through the null, resulting in an output record (f1, f2) where f2 is null.
> It would be useful to update FLATTEN docs to mention this.
> http://svn.apache.org/viewvc/pig/trunk/src/docs/src/documentation/content/xdocs/basic.xml?view=markup#l5051
> I'm guessing these are the relevant bits which affect this behavior:
> http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POForEach.java?view=markup#l440
> http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POForEach.java?view=markup#l468



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)