GROUP-BY
Tuesday, February 22, 2011
4:07 PM
GROUP-BY
Input: a bag and a sequence of fields
Output: a new bag in which
The selected sequence of fields remains. 
Remaining fields are grouped into a bag.
E.g., 
DUMP X;
(Alex,1)
(Alex,2)
(George,5)
Y = GROUP X by $0;
DUMP Y; 
(Alex, {(Alex,1),(Alex,2)})
(George,{(George,5)})