title: why group in pig has odd order behavier
body: <p>In hadoop if you want to group and order something and you write java , the result is that group keys will also be sort defaultly by Lexicographical order,all done with one MR job, so that you spare the another order job.</p>
  
  <p>But now I join using Pig , find a quirky thing.</p>
  
  <p>My input (test.txt) is:</p>
  
  <pre><code>a  
  ab   
  abc  
  b     
  c
  </code></pre>
  
  <p>My script is:</p>
  
  <pre><code>A=load 'test.txt' as c1:chararray;
  B=group A by c1;
  dump B;
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>(a)   
  (b)      
  (c)      
  (ab)      
  (abc) 
  </code></pre>
  
  <p>Why it has group key order depend on string length but alphabetical order.that way I need to do another key order job ,two jobs total,because there is no comparator plugin for group.</p>
  
  <p>Any solution for group&amp;order  at once? i would much appreciate.</p>