Yeah, says so in the manual - "A single element enclosed in parens ( ) like (5) is not considered to be a tuple but rather an arithmetic operator." http://pig.apache.org/docs/r0.10.0/basic.html#type-construction
We can always use TOTUPLE. This should work: a = load 'a' as (x,y); b = foreach a generate TOTUPLE(TOTUPLE(x)); dump b; Regards, Abhinav On 29 June 2012 01:34, Yang <[email protected]> wrote: > it seems that (at least with 0.10.0 ) I can generate a nested tuple inside > a bag. > > but if I want to insert a tuple directly under a tuple, they seem to merge > together into one level directly. > > for example > > a = load 'a' as (x,y); > > b = foreach a generate ((x)); > > dump b; > > the result is just a flat record, instead of nested tuple > > > > but generate {(x)} does work >
