Detailed example of flattening
Wednesday, February 23, 2011
3:08 PM
grunt> DUMP x; 
(1,(2,(3)))
(4,(5,(6)))
grunt> y = FOREACH x GENERATE $0,FLATTEN($1); 
grunt> DUMP y;
(1,2,3)
(4,5,6)
grunt> DUMP z; 
(1,{(2),(3)})
(4,{(5)})
(6,{(7)}
grunt> w = FOREACH z GENERATE $0,FLATTEN($1);
grunt> DUMP w; 
(1,2)
(1,3)
(4,5)
(6,7)