How are you loading this data? D
On Mon, Aug 29, 2011 at 8:05 AM, Vincent Barat <vincent.ba...@gmail.com>wrote: > I'm currently testing PIG 0.9.x branch. > Several of my jobs that use to work correctly with PIG 0.8.1 now fail due > to a cast error returning a null pointer in one of my UDF function. > > Apparently, PIG seems to be unable to convert some data to a bag when some > of the tuple fields are null: > > 2011-08-29 15:50:48,720 | WARN | Thread-270 | PigHadoopLogger | > org.apache.pig.backend.hadoop.**executionengine.physicalLayer.**expressionOperators.POCast: > Unable to interpret value {(1239698069000,)} in field being converted to > type bag, caught ParseException <Cannot convert (1239698069000,) to > null:(timestamp:long,name:**chararray)> field discarded > 2011-08-29 15:50:48,729 | WARN | Thread-270 | LocalJobRunner | > job_local_0019 > > My UDF functions is: > > /** > *... > * @param start start of the session (in milliseconds since epoch) > * @param end end of the session (in milliseconds since epoch) > * @param activities a bag containing a set of activities in the form of a > set of (timestamp:long, > * name:chararray) tuples > * ... > */ > public DataBag exec(Tuple input) throws IOException > { > /* Get session's start/end timestamps */ > long startSession = (Long) input.get(0); > long endSession = (Long) input.get(1); > > /* Get the activity bag */ > DataBag activityBag = (DataBag) input.get(2); > > ^ here > > > Is that a regression ? Any idea to fix this ? > > Thanks a lot, I really need to jump to PIG 0.9.1 and 0.10.0 :-) >