pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Gates (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-359) Semantics of generate * have changed
Date Tue, 26 Aug 2008 21:46:44 GMT

    [ https://issues.apache.org/jira/browse/PIG-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625885#action_12625885

Alan Gates commented on PIG-359:

I don't think we want the changes to POUserFunc.  In the cases of udf(*) the right thing will
happen in the existing code because lines 159-161 handle making sure we don't double wrap
tuples.  And removing these lines causes problems for scripts like this:

A = load 'myfile' as a:tuple (...);
B = foreach A generate udf(a);

Now 'a' will be double wrapped (that is, there will be a tuple containing just the tuple 'a').
 This isn't what we want.

The changes to POForEach look good.

> Semantics of generate * have changed
> ------------------------------------
>                 Key: PIG-359
>                 URL: https://issues.apache.org/jira/browse/PIG-359
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Assignee: Shravan Matthur Narayanamurthy
>             Fix For: types_branch
>         Attachments: 359-1.patch, 359.patch
> In the main trunk, the script
> A = load 'myfile';
> B = foreach A generate *;
> returns:
> (x, y, z)
> In the types branch, it returns:
> ((x, y, z))
> There is an extra level of tuple in it.  In the main branch generate * seems to include
an implicit flatten.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message