title: How to covert tuple to string in pig?
body: <p>I have data as </p>
  
  <pre><code>id company
  1  (a,b)
  2  (a,c)
  3  (f,g,h)
  </code></pre>
  
  <p>company is tuple, I generate it from <code>BagToTuple(sortedbag.company) AS company</code>.</p>
  
  <p>I would like to remove the formate of tuple, I would like the data is looked as following:</p>
  
  <pre><code>id company
  1  a b
  2  a c
  3  f g h
  </code></pre>
  
  <p>I would like the company column has no brackets and separate by space. Thanks.</p>
  
  <p>===================update</p>
  
  <p>I have the data set as </p>
  
  <pre><code>id company
  1  a
  1  b
  1  a
  2  c
  2  a
  </code></pre>
  
  <p>I wrote the code as following:
  record = load....</p>
  
  <pre><code>grp = GROUP record BY id; 
  
  newdata = FOREACH grp GENERATE group AS id, 
          COUNT(record) AS counts, 
          BagToTuple(record.company) AS company;
  </code></pre>
  
  <p>The output is looks like:</p>
  
  <pre><code>id count company
  1  3     (a,b,a)
  2  2     (c,a)
  </code></pre>
  
  <p>But I would like company can be sorted and distinct, and no Brackets, and divide by space.
  What I expect result is as following: </p>
  
  <pre><code>id count company
  1  3     a b
  2  2     a c
  </code></pre>