|
|
-
Number of columns in a relationTom White 2009-01-05, 21:52
Hi,
I'm trying to filter on the number of columns in a relation as suggested in the FAQ, but I get the following error. This is in the types branch. Has the syntax changed or does this look like a bug? A = LOAD 'foo' USING PigStorage('\t'); B = FILTER A BY ARITY(*) < 5; DUMP B; 2009-01-05 21:46:56,355 [main] ERROR org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc - Caught error from UDF org.apache.pig.builtin.ARITY[org.apache.pig.data.DataByteArray cannot be cast to org.apache.pig.data.Tuple [org.apache.pig.data.DataByteArray cannot be cast to org.apache.pig.data.Tuple]] 2009-01-05 21:46:56,356 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Failed jobs!! 2009-01-05 21:46:56,356 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - 1 out of 1 failed! 2009-01-05 21:46:56,357 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException: Unable to open iterator for alias: B [Job terminated with anomalous status FAILED] at org.apache.pig.PigServer.openIterator(PigServer.java:389) at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:269) at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:178) at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:94) at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58) at org.apache.pig.Main.main(Main.java:282) Caused by: java.io.IOException: Job terminated with anomalous status FAILED ... 6 more 2009-01-05 21:46:56,357 [main] ERROR org.apache.pig.tools.grunt.GruntParser - Unable to open iterator for alias: B [Job terminated with anomalous status FAILED] 2009-01-05 21:46:56,357 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException: Unable to open iterator for alias: B [Job terminated with anomalous status FAILED] Thanks, Tom |