2013年7月28日星期日

Pig in the Group by stable do ?

Pig in a Group By operator , I want to know , group by the same set of records will not change the original order.
example:
cat a.txt:
John, 28, male
Jonh, 27, female
James, 29, male

A = load 'a.txt' as (name: chararray, age: int, gender: chararray);
B = group A by name;
describe B;
B: {group: chararray, A: {(name: chararray, age: int, gender: chararray)}}
dump B;
(John, {(John, 28, male), (John, 26, female)})
(James, {(James, 29, male})

this result does not put (John, 28, male) and (Jonh, 27, female), which have the same key tuple of the original order will not be after the group by changing it ?
That group by the stability of it ?
------ Solution ---------------------------------------- ----
This reply was moderator deleted at 2013-07-18 10:53:39 <>
------ Solution ------------------------------------ --------
This reply was moderator deleted at 2013-07-18 10:53:49 <>
------ For reference only ---------------------------------- -----
after several tests and found that group by is unstable.
------ For reference only -------------------------------------- -
Lz Are you sure about this ?
loud noise measured ?
------ For reference only -------------------------------------- -
ran dozens of megabytes of data, analyze the results obtained
------ For reference only -------------------- -------------------
landlord, 4th floor, 5th floor , this will not pour points, just this once
------ For reference only - -------------------------------------
then how can I Results posted it ?

1 条评论: