public static FunctionResource[] toFunctionResource(List<ResourceUri> resources) throws HiveException {
    if (resources == null) {
      return null;
    }

    FunctionResource[] converted = new FunctionResource[resources.size()];
    for (int i = 0; i < converted.length; i++) {
      ResourceUri resource = resources.get(i);
      SessionState.ResourceType type = getResourceType(resource.getResourceType());
      converted[i] = new FunctionResource(type, resource.getUri());
    }
    return converted;
  }
Extracts the UDAFE evaluators of the specified class from the provided aggregations.
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionUtils.java