public T getFuncExprNodeDescWithUdfData(String udfName, TypeInfo typeInfo,
        T... children) throws SemanticException {

      FunctionInfo fi;
      try {
        fi = exprFactory.getFunctionInfo(udfName);
      } catch (SemanticException e) {
        throw new UDFArgumentException(e);
      }
      if (fi == null) {
        throw new UDFArgumentException(udfName + " not found.");
      }

      if (!fi.isGenericUDF()) {
        throw new UDFArgumentException(udfName
            + " is an aggregation function or a table function.");
      }

      List<T> childrenList = new ArrayList<>(children.length);

      childrenList.addAll(Arrays.asList(children));
      return exprFactory.createFuncCallExpr(typeInfo, fi, udfName, childrenList);
    }
This function create an ExprNodeDesc for a UDF function given the
children (arguments). It will insert implicit type conversion functions
if necessary.

@throws UDFArgumentException
ql/src/java/org/apache/hadoop/hive/ql/parse/type/TypeCheckProcFactory.java