Skip to content

Instantly share code, notes, and snippets.

@rjurney
Created December 26, 2014 19:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjurney/83f2be7212504bf017c2 to your computer and use it in GitHub Desktop.
Save rjurney/83f2be7212504bf017c2 to your computer and use it in GitHub Desktop.
A Pig JOIN is just a COGROUP/FLATTEN
slugging_fatness_join = JOIN fatness BY player_id, slugging_stats BY player_id;
-- Equivalent
slugging_fatness_join = FOREACH
(COGROUP fatness BY player_id, slugging_stats BY player_id)
GENERATE
FLATTEN(fatness),
FLATTEN(slugging_stats);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment