You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Yang <te...@gmail.com> on 2012/06/23 02:34:03 UTC
small problem with pigUnit
if I have an assert line:
assertOutput('myinput' , input_data, 'myoutput', output_data);
and in my test pig script, I dump out the var myoutput:
dump myoutput;
the UDF used in the script fails to get its parameters , i.e. for the
following script:
myinput = LOAD 'blahblah' as x: tuple(something something something);
myoutput = FOREACH myinput GENERATE myUDF(x);
dump myoutput; ------ this causes problems
STORE myoutput INTO 'blahbbbbbbb';
does this sound like a bug?
Thanks
Yang
Re: small problem with pigUnit
Posted by Yang <te...@gmail.com>.
the issue is that if you have the "dump" line, the udf "myUDF(x)" fails to
get the
parameter : as I debug into the udf, the parameter tuple.get(0) gives NULL
Yang
On Sat, Jun 23, 2012 at 10:14 PM, Subir S <su...@gmail.com> wrote:
> On Sat, Jun 23, 2012 at 6:04 AM, Yang <te...@gmail.com> wrote:
>
> > if I have an assert line:
> >
> > assertOutput('myinput' , input_data, 'myoutput', output_data);
> >
> >
> > and in my test pig script, I dump out the var myoutput:
> >
> > dump myoutput;
> >
> >
> >
> > the UDF used in the script fails to get its parameters , i.e. for the
> > following script:
> >
> >
> > myinput = LOAD 'blahblah' as x: tuple(something something something);
> >
> > myoutput = FOREACH myinput GENERATE myUDF(x);
> >
> > dump myoutput; ------ this causes problems
> >
>
> What Problems?
> Do you have any error logs or exceptions that can be shared.
>
> >
> > STORE myoutput INTO 'blahbbbbbbb';
> >
> >
> >
> >
> >
> > does this sound like a bug?
> >
> > Thanks
> > Yang
> >
>
Re: small problem with pigUnit
Posted by Subir S <su...@gmail.com>.
On Sat, Jun 23, 2012 at 6:04 AM, Yang <te...@gmail.com> wrote:
> if I have an assert line:
>
> assertOutput('myinput' , input_data, 'myoutput', output_data);
>
>
> and in my test pig script, I dump out the var myoutput:
>
> dump myoutput;
>
>
>
> the UDF used in the script fails to get its parameters , i.e. for the
> following script:
>
>
> myinput = LOAD 'blahblah' as x: tuple(something something something);
>
> myoutput = FOREACH myinput GENERATE myUDF(x);
>
> dump myoutput; ------ this causes problems
>
What Problems?
Do you have any error logs or exceptions that can be shared.
>
> STORE myoutput INTO 'blahbbbbbbb';
>
>
>
>
>
> does this sound like a bug?
>
> Thanks
> Yang
>