+ " cg2 = cogroup l2 by i, l1 by i; "
+ " f2 = foreach cg1 generate group as gkey, flatten(l2), flatten(l1); "
+ "u = union onschema f1, f2; " ;
Util.registerMultiLineQuery(pig, query);
Schema sch = pig.dumpSchema("u");
Schema expectedSch =
Util.getSchemaFromString("gkey: int, l1::i: int, l1::j: int, l2::i: int, l2::x: chararray");
assertEquals("Checking expected schema",sch, expectedSch);
Iterator<Tuple> it = pig.openIterator("u");