public static GenericUDAFInfo getGenericUDAFInfo2(GenericUDAFEvaluator evaluator,
      GenericUDAFEvaluator.Mode emode, List<ObjectInspector> aggOIs)
      throws SemanticException {

    GenericUDAFInfo r = new GenericUDAFInfo();

    // set r.genericUDAFEvaluator
    r.genericUDAFEvaluator = evaluator;

    // set r.returnType
    ObjectInspector returnOI = null;
    try {
      ObjectInspector[] aggOIArray = new ObjectInspector[aggOIs.size()];
      for (int ii = 0; ii < aggOIs.size(); ++ii) {
        aggOIArray[ii] = aggOIs.get(ii);
      }
      returnOI = r.genericUDAFEvaluator.init(emode, aggOIArray);
      r.returnType = TypeInfoUtils.getTypeInfoFromObjectInspector(returnOI);
    } catch (HiveException e) {
      throw new SemanticException(e);
    }

    return r;
  }
Returns the GenericUDAFInfo struct for the aggregation.

@param evaluator
@param emode
@param aggParameters
         The exprNodeDesc of the original parameters
@return GenericUDAFInfo
@throws SemanticException
          when the UDAF is not found or has problems.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java