You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by James Kebinger <jk...@gmail.com> on 2009/12/13 02:10:54 UTC

set operations on bags?

Are there set operations on bags beyond the DIFF operator? I'd like to
compare bags to find elements in both of them (intersection). I can imagine
union and set addition and subtraction being useful here too.
thanks
james

Re: set operations on bags?

Posted by Alan Gates <ga...@yahoo-inc.com>.
There is union as a relational operator, ie  C = A union B, but  
there's no union, intersection, etc. operators available for bags at  
the moment.  We're open to adding them.

Alan.

On Dec 12, 2009, at 5:10 PM, James Kebinger wrote:

> Are there set operations on bags beyond the DIFF operator? I'd like to
> compare bags to find elements in both of them (intersection). I can  
> imagine
> union and set addition and subtraction being useful here too.
> thanks
> james