pig-user  

Re: contains

hc busy
Fri, 19 Mar 2010 11:39:21 -0700

done. It's kind of odd, that bag always contain tuples...

because if I want to find a string in a bag of strings... I have to iterate
through the bag, take out string inside each tuple.get(0) and then do the
search.

contains("key1", {("key1"),("key2"),("key3")});


On Thu, Mar 18, 2010 at 7:45 PM, Jeff Zhang <zjf...@gmail.com> wrote:

> I am afraid you have to write your udf for this.
>
>
> On Thu, Mar 18, 2010 at 2:43 AM, hc busy <hc.b...@gmail.com> wrote:
>
> > Just a quick q, is there a way to evaluate "contains"?
> >
> > contains((1,2), {(2,4),(4,5),(6,7),(1,2)});
> >
> >
> > thnx
> >
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>