pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shravan Matthur Narayanamurthy (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-359) Semantics of generate * have changed
Date Mon, 25 Aug 2008 10:47:44 GMT

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

Shravan Matthur Narayanamurthy updated PIG-359:

    Attachment: 359-1.patch

You are right olga. This is * specific. Changed the patch to include the following:
In foreach when the operator gets created it also creates a list of the leaves of its inner
plans for optimization. Here I also check if the leaf of an innerplan is a project(*). If
so I set flatten true for that plan. This causes the foreach logic to flatten tuples.

The same was the case in POUserFunc when you process * as an input. The semantics were different
from the trunk. So changed it in a similar way to ensure the trunk behaviour. 

Because of the changes, needed to change a test case and a golden file.

All of them inculded in 359-1. Thanks Olga for reviewing.

> 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