Re: not in via join

2010-03-30 Thread Alan Gates
What you gave seems like it should work. But I'd try it as: C = COGROUP A BY id, B BY id; D = FILTER C BY COUNT(A) = 0; E = FOREACH D GENERATE FLATTEN(B); Alan. On Mar 29, 2010, at 7:06 PM, Kent Shi wrote: Hi, I am trying to get the elements of B not in A. My code is like this C = JOIN A

Re: not in via join

2010-03-30 Thread hc busy
Just saw a response to this recently, the right way is to use co-group to join A and B and then to check IsEmpty(A) instead of doing an outer join and checking is null On Mon, Mar 29, 2010 at 7:06 PM, Kent Shi k...@ning.com wrote: Hi, I am trying to get the elements of B not in A. My code

Re: not in via join

2010-03-30 Thread Kent Shi
Thanks, that worked. I also found out the reason why my code didn't work here https://issues.apache.org/jira/browse/PIG-1289 On Mar 30, 2010, at 10:58 AM, Alan Gates wrote: What you gave seems like it should work. But I'd try it as: C = COGROUP A BY id, B BY id; D = FILTER C BY

not in via join

2010-03-29 Thread Kent Shi
Hi, I am trying to get the elements of B not in A. My code is like this C = JOIN A BY id RIGHT OUTER, B BY id; D = FILTER C BY A::id is null; id is an INT, and this doesn't work. I also tried A::id != B::id, (chararray)A::id == '', both also didn't work. Can someone tell me how I should do