Hello,
is it possible to return a bag from UDF?
When I def. my python UDF like this... it simply doesnt work....
@outputSchema("y:bag{key:int, t:tuple(len:int,word:chararray)}")
def toTuple(bag):
2011-04-24 16:06:08,794 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 2998: Unhandled internal error. Error parsing schema for script
function from the decorator
org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered " "bag"
"bag "" at line 1, column 3.
Was expecting one of:
"int" ...
"long" ...
"float" ...
"double" ...
"chararray" ...
"bytearray" ...
"int" ...
"long" ...
"float" ...
"double" ...
"chararray" ...
"bytearray" ...
Thanks.