Details
Description
1.txt:
1, 2, 3
4, 5, 6
7, 8, 9
a = load '1.txt' using PigStorage(',') as (x:int, y:int, z:int);
b = foreach a generate TOTUPLE(x, y) as t, z;
c = group b by t;
d = foreach c generate flatten(b);
e = foreach d generate t;
Describing d shows the schema as d:
{b::t: (x: int,y: int),b::z: int}However, when dumping d the output is
(1,3)
(4,6)
(7,9)
Describing e shows the schema as e:
{b::t: (x: int,y: int)}However, when dumping I got the following error:
java.lang.ClassCastException: java.lang.Integer cannot be cast to org.apache.pig.data.Tuple