So what I am saying is, check that you are not inserting some weird
non-ascii quotes in your actual script.
I just ran this on Pig 6, it worked:

grunt> data = load 'tmp/nulltest' using PigStorage() as (num);
grunt> dump data;
(1)
(2)
()
(3)
grunt> find_nulls = foreach data generate ( num is null ? 'U' : num );
grunt> dump find_nulls;
(1)
(2)
(U)
(3)

I double-checked just in case, and it works in both local and mapreduce
modes.

-Dmitriy

On Sun, May 16, 2010 at 1:49 PM, Syed Wasti <[email protected]> wrote:

> Hmm not sure why, I used quotes in this mail, let me rewrite,
> SQL(U is within single quotes): NVL(city,U) city
> Pig(U is within single quotes): (city is null?U:city) AS city
>
>
>
> On 5/16/10 1:36 PM, "Dmitriy Ryaboy" <[email protected]> wrote:
>
> > Syed,
> > The samples you pasted include all kinds of extraneous characters. Are
> you
> > sure your script is properly encoded?
> >
> >
> > On Sun, May 16, 2010 at 1:16 PM, Syed Wasti <[email protected]> wrote:
> >
> >> I am trying the SQL ³NVL(city, ŒU¹) city² in pig I am using the bincond
> >> operator, ³(city is null?'U': city) AS city², which is of chararray
> type,
> >> the result file shows Œ\N¹ instead of U.  Any ideas ?
> >>
>
>
>

Reply via email to