cogroup

Posted by Michele Bertoni on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/cogroup-tp1839.html

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