hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mridul Muralidharan <mrid...@yahoo-inc.com>
Subject Re: [jira] Created: (PIG-359) Semantics of generate * have changed
Date Tue, 05 Aug 2008 19:38:00 GMT

Assuming 2 field schema for A, shouldn't

B = foreach A generate $0, $1;
and
B = foreach A generate *;

not be the same ?

This is similar to

B = foreach A generate myFunc($0, $1)
and
B = foreach A generate myFunc(*)

The udf gets a tuple in both cases as ($0, $1) and not (($0, $1)) for 
second case.


Regards,
Mridul




Alan Gates (JIRA) wrote:
> 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
>             Priority: Minor
>              Fix For: types_branch
> 
> 
> 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.
> 


Mime
View raw message