@Override
  public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {
    checkArgsSize(arguments, 2, 2);

    checkArgPrimitive(arguments, 0);
    checkArgPrimitive(arguments, 1);

    checkArgGroups(arguments, 0, inputTypes, STRING_GROUP, DATE_GROUP, VOID_GROUP);
    checkArgGroups(arguments, 1, inputTypes, STRING_GROUP, VOID_GROUP);

    obtainDateConverter(arguments, 0, inputTypes, converters);
    obtainStringConverter(arguments, 1, inputTypes, converters);

    if (arguments[1] instanceof ConstantObjectInspector) {
      String dayOfWeek = getConstantStringValue(arguments, 1);
      isDayOfWeekConst = true;
      dayOfWeekIntConst = getIntDayOfWeek(dayOfWeek);
    }

    ObjectInspector outputOI = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    return outputOI;
  }
GenericUDFNextDay.

Returns the first date which is later than start_date and named as indicated
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFNextDay.java