You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Aniket Mokashi (JIRA)" <ji...@apache.org> on 2013/10/23 03:35:42 UTC
[jira] [Work started] (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 ]
Work on PIG-3368 started by Aniket Mokashi.
> 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.13.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.1#6144)