Alan Gates
Mon, 08 Feb 2010 10:28:53 -0800
Alan. On Feb 7, 2010, at 9:02 AM, Rusty Klophaus wrote:
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 1at org.apache.pig.impl.logicalLayer.schema.Schema.getField(Schema.java: 749)atorg .apache .pig.impl.logicalLayer.LOProject.getFieldSchema(LOProject.java:289)$ pig --version Apache Pig version 0.5.0 (r829623) compiled Oct 25 2009, 18:58:38If I run just the FILTER or ORDER operation in the inner bag, it works. Butwhen I put them both in there, it fails. Has anybody else experienced this problem? Am I doing something wrong? Thanks, Rusty Klophaus