Why do you not use a join? CoGroup seems not to be the right operator. -Matthias
On 06/29/2015 05:40 PM, Michele Bertoni wrote: > Hi I have a question on cogroup > > when I cogroup two dataset is there a way to compare each element on the left > with each element on the right (inside a group) without collecting one side? > > right now I am doing > > left.cogroup(right).where(0,1,2).equalTo(0,1,2){ > (leftIterator, rightIterator, out) => { > val lSet = leftIterator.toSet // <———— toSet > for(r <- rightIterator) > for(l <- lSet) > //do something > } > } > > I would like to avoid the toSet > > > thanks for help >
signature.asc
Description: OpenPGP digital signature