Hello,
I am trying to FILTER and then ORDER an inner bag, for example:
A = LOAD ...blah... AS (first, last, age, kids:bag{kid:tuple(name, age)});
B = FOREACH A {
filteredkids = FILTER kids BY age != 1;
sortedkids = ORDER filteredkids BY age;
GENERATE sortedkids;
}
DUMP B;
When I run this, I get a stacktrace with a root error of:
Caused by: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1026:
Attempt to fetch field 1 from schema of size 1
at org.apache.pig.impl.logicalLayer.schema.Schema.getField(Schema.java:749)
at
org.apache.pig.impl.logicalLayer.LOProject.getFieldSchema(LOProject.java:289)
$ pig --version
Apache Pig version 0.5.0 (r829623)
compiled Oct 25 2009, 18:58:38
If I run just the FILTER or ORDER operation in the inner bag, it works. But
when I put them both in there, it fails.
Has anybody else experienced this problem? Am I doing something wrong?
Thanks,
Rusty Klophaus