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/22 23:29:51 UTC
can't verify an output bag with pigUnit?
pigUnit compares the serialized string of an output result against a
pre-defined expected output string.
this is a problem with DataBag output, cuz the order of elements in a bag
is not guaranteed.
So the actual output from the test script could be anything, and can't be
compared with an expected serialized string.
how could I solve this usecase?
Thanks
Yang
Re: can't verify an output bag with pigUnit?
Posted by Yang <te...@gmail.com>.
nice I'll try to contribute something
On Wed, Jun 27, 2012 at 1:31 PM, Daniel Dai <da...@hortonworks.com> wrote:
> We don't have those yet. Take a look of some functions in
> org.apache.pig.test.Util, such as checkQueryOutputsAfterSortRecursive. You
> might need something port to PigUnit.
>
> On Fri, Jun 22, 2012 at 2:29 PM, Yang <te...@gmail.com> wrote:
>
> > pigUnit compares the serialized string of an output result against a
> > pre-defined expected output string.
> >
> > this is a problem with DataBag output, cuz the order of elements in a bag
> > is not guaranteed.
> > So the actual output from the test script could be anything, and can't be
> > compared with an expected serialized string.
> >
> > how could I solve this usecase?
> >
> > Thanks
> > Yang
> >
>
Re: can't verify an output bag with pigUnit?
Posted by Daniel Dai <da...@hortonworks.com>.
We don't have those yet. Take a look of some functions in
org.apache.pig.test.Util, such as checkQueryOutputsAfterSortRecursive. You
might need something port to PigUnit.
On Fri, Jun 22, 2012 at 2:29 PM, Yang <te...@gmail.com> wrote:
> pigUnit compares the serialized string of an output result against a
> pre-defined expected output string.
>
> this is a problem with DataBag output, cuz the order of elements in a bag
> is not guaranteed.
> So the actual output from the test script could be anything, and can't be
> compared with an expected serialized string.
>
> how could I solve this usecase?
>
> Thanks
> Yang
>