protected void obtainLongConverter(ObjectInspector[] arguments, int i,
      PrimitiveCategory[] inputTypes, Converter[] converters) throws UDFArgumentTypeException {
    PrimitiveObjectInspector inOi = (PrimitiveObjectInspector) arguments[i];
    PrimitiveCategory inputType = inOi.getPrimitiveCategory();
    switch (inputType) {
    case BYTE:
    case SHORT:
    case INT:
    case LONG:
    case VOID:
      break;
    default:
      throw new UDFArgumentTypeException(i, getFuncName()
          + " only takes LONG/INT/SHORT/BYTE types as " + getArgOrder(i) + " argument, got "
          + inputType);
    }

    Converter converter = ObjectInspectorConverters.getConverter(
        arguments[i],
        PrimitiveObjectInspectorFactory.writableLongObjectInspector);
    converters[i] = converter;
    inputTypes[i] = inputType;
  }
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