public static Object invoke(Method m, Object thisObject, Object... arguments)
      throws HiveException {
    Object o;
    try {
      o = m.invoke(thisObject, arguments);
    } catch (Exception e) {
      StringBuilder argumentString = new StringBuilder();
      if (arguments == null) {
        argumentString.append("null");
      } else {
        argumentString.append("{");
        for (int i = 0; i < arguments.length; i++) {
          if (i > 0) {
            argumentString.append(",");
          }

          argumentString.append(arguments[i]);
        }
        argumentString.append("}");
      }

      String detailedMsg = e instanceof java.lang.reflect.InvocationTargetException ?
        e.getCause().getMessage() : e.getMessage();

      // Log the arguments into a debug message for the ease of debugging. But when exposed through
      // an error message they can leak sensitive information, even to the client application.
      LOG.trace("Unable to execute method " + m + " with arguments "
              + argumentString);
      throw new HiveException("Unable to execute method " + m + ":" + detailedMsg, e);
    }
    return o;
  }
Get the GenericUDAF evaluator for the name and argumentClasses.

@param name
         the name of the UDAF
@param argumentOIs
@param isDistinct
@param isAllColumns
@return The UDAF evaluator
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java