Re: Replace null with string

2012-06-08 Thread Russell Jurney
l; > } > > return inputVal; > } > catch(Exception e) > { > // Throwing an exception will cause the task to fail. > throw new IOException("Something bad happened!", e); > } >} > } >

Re: Replace null with string

2012-06-08 Thread Dragan Nedeljkovic
ng an exception will cause the task to fail. throw new IOException("Something bad happened!", e);   }    } } // eof > > From: Mario Lassnig >To: user@pig.apache.org >Sent: Thursday, June 7, 2012 7:37:36 AM >Subject: Replace

Re: Replace null with string

2012-06-07 Thread Dmitriy Ryaboy
Nonulls = foreach somenulls generate (field == null ? 'other' : field) as field; On Jun 7, 2012, at 4:37 AM, Mario Lassnig wrote: > Hello, > > I'm having a lot of null entries in my data. Due to later processing it would > be very helpful if I could set a default value for null to be the str

Replace null with string

2012-06-07 Thread Mario Lassnig
Hello, I'm having a lot of null entries in my data. Due to later processing it would be very helpful if I could set a default value for null to be the string "other". I couldn't find a way to do this (version 0.8.1-cdh3u4) Also, I have some variables in my GENERATE statements that can potenti