IsEmpty is the function you might be looking for
http://pig.apache.org/docs/r0.9.1/func.html#isempty

Thanks,
Prashant

On Mon, Feb 13, 2012 at 9:41 AM, Flo Leibert <[email protected]>wrote:

> Hi -
> Is there a good way to see if a bag contains a tuple? Given a record that
> has a tuple T and a Bag (a bag could contain 0 to n tuples), how do I
> filter the records where the bag contains the tuple?
>
> I could write a custom UDF but Pig probably has a built-in function that
> takes care of this? Looked at the list of built-in functions but couldn't
> identify one - afaict, there's not "CONTAINS" function.
>
> Any pointers would be appreciated!
>
> Thanks,
> florian
>

Reply via email to