title: Can't invoke Java UDF which accepts Tuple input
body: <p>I can't understand the way to invoke Java UDF which accepts Tuple as input.</p>
  
  <pre><code>gsmCell = LOAD '$gsmCell' using PigStorage('\t') as
            (branchId,
             cellId: int,
             lac: int,
             lon: double,
             lat: double
            );
  
  gsmCellFiltered = FILTER gsmCell BY     cellId     is not null and
                                          lac        is not null and
                                          lon        is not null and
                                          lat        is not null;
  
  gsmCellFixed = FOREACH gsmCellFiltered GENERATE FLATTEN (pig.parser.GSMCellParser(* ) )  as
                                                  (cellId: int,
                                                   lac: int,
                                                   lon: double,
                                                   lat: double,
                                                  );
  </code></pre>
  
  <p>When I wrap input for GSMCellParser using () I get inside UDF:
  Tuple(Tuple).
  Pig does wraps all fields into tuple and puts it inside one more tuple.</p>
  
  <p>When I try to pass a list of fields, use * or $0.. I do get exception:</p>
  
  <pre><code>sed by: org.apache.pig.impl.logicalLayer.validators.TypeCheckerException: ERROR 1045: 
  &lt;line 28, column 57&gt; Could not infer the matching function for pig.parser.GSMCellParser as multiple or none of them fit. Please use an explicit cast.
      at org.apache.pig.newplan.logical.visitor.TypeCheckingExpVisitor.visit(TypeCheckingExpVisitor.java:761)
      at org.apache.pig.newplan.logical.expression.UserFuncExpression.accept(UserFuncExpression.java:88)
      at org.apache.pig.newplan.ReverseDependencyOrderWalker.walk(ReverseDependencyOrderWalker.java:70)
      at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
      at org.apache.pig.newplan.logical.visitor.TypeCheckingRelVisitor.visitExpressionPlan(TypeCheckingRelVisitor.java:191)
      at org.apache.pig.newplan.logical.visitor.TypeCheckingRelVisitor.visit(TypeCheckingRelVisitor.java:157)
      at org.apache.pig.newplan.logical.relational.LOGenerate.accept(LOGenerate.java:246)
  </code></pre>
  
  <p>What Do i do wrong?
  My aim is to feed my UDF with tuple. Tuple should contain a list of fields. (i.e. size of tuple should be 4: cellid, lac, lon. lat)</p>
  
  <p><strong>UPD:</strong>
  I've tried GROUP ALL:</p>
  
  <pre><code>--filter non valid records
  gsmCellFiltered = FILTER gsmCell BY     cellId     is not null and
                                          lac        is not null and
                                          lon        is not null and
                                          lat        is not null and
                                          azimuth    is not null and
                                          angWidth   is not null;
  
  gsmCellFilteredGrouped = GROUP gsmCellFiltered ALL;
  
  --fix records
  gsmCellFixed = FOREACH gsmCellFilteredGrouped GENERATE FLATTEN                  (pig.parser.GSMCellParser($1))  as
                                                          (cellId: int,
                                                           lac: int,
                                                           lon: double,
                                                           lat: double,
                                                           azimuth: double,
                                                           ppw,
                                                           midDist: double,
                                                           maxDist,
                                                           cellType: chararray,
                                                           angWidth: double,
                                                           gen: chararray,
                                                           startAngle: double
                                                          );
  
  
  
  Caused by: org.apache.pig.impl.logicalLayer.validators.TypeCheckerException: ERROR 1045: 
  &lt;line 27, column 64&gt; Could not infer the matching function for pig.parser.GSMCellParser as multiple or none of them fit. Please use an explicit cast.
  </code></pre>
  
  <p>The input schema for this UDF is: Tuple
  I do't get the idea.
  Tuple is an ordered set of fileds. LOAD function returns a tuple to me.
  I want to pass the whole tuple to my UDF. </p>