Guys, I have some data that has null bag. Looking at the COUNT.java it seems that it is an error condition for the bag passed in to be null (instead of zero for example.)
I tried to change it to an empty bag when it's null data = FOREACH input GENERATE bagField is null?{}:bagField as bagField; count = FOREACH data GENERATE count(bagField); Typing these into grunt works fine, but describing it results in error: 449 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1048: Two inputs of BinCond must have compatible schemas. left hand side: bag right hand side: bagField: bag({a:int, b:int, c:chararray}) Can somebody help me with this syntax or a workaround? thanks in advance!