Skip to content

Instantly share code, notes, and snippets.

@neilkod
Created July 18, 2011 21:08
Show Gist options
  • Save neilkod/1090659 to your computer and use it in GitHub Desktop.
Save neilkod/1090659 to your computer and use it in GitHub Desktop.
interested to know how pig optimizes this statement
Does each MAX() get executed once or twice?
max_buckets = foreach grouped_buckets
generate group as reg
, MAX(buckets.is_drive_by) as is_drive_by
, MAX(buckets.involved) as is_involved
, MAX(buckets.engaged) as is_engaged
, MAX(buckets.is_drive_by) + MAX(buckets.involved) + MAX(buckets.engaged) as total;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment