protected void checkArgPrimitive(ObjectInspector[] arguments, int i)
      throws UDFArgumentTypeException {
    ObjectInspector.Category oiCat = arguments[i].getCategory();
    if (oiCat != ObjectInspector.Category.PRIMITIVE) {
      throw new UDFArgumentTypeException(i, getFuncName() + " only takes primitive types as "
          + getArgOrder(i) + " argument, got " + oiCat);
    }
  }
Some information may be set during initialize() which needs to be saved when the UDF is copied.
This will be called by FunctionRegistry.cloneGenericUDF()
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java