bug in pseudocode and implementation this looks wrong for the case where either the left or right set has multiple matches for any single row in the other set given simple result set left a b c d right b c c d e this code would give b c d while the correct result is b c c d