This is kind of similar to the problem I posted on this list a few days back. Basically, Pig seems to have problem parsing the statement where you try to access the inner bag of another inner bag. I would also like to know if there is a fix or walk-around for this problem.
Baoshi Yan Sr. Software Engineer SNA / RecEngine / Data Standardization [email protected] On Dec 9, 2010, at 3:34 PM, Lin Guo wrote: > A = load 'foo.txt' using PigStorage as (x : chararray, y : int); > > B = group A by x; > C = group B by group; > describe C; > > -- we got > -- C: {group: chararray,B: {group: chararray,A: {x: chararray,y: int}}} > > D = foreach C generate B.(group, A); -- this works > describe D; > > E = foreach C generate B.(group, A.(x)); > describe E; > --- pig returns syntax error, but should this work? Or is there a patch for > it? > > thanks, > lin
