@Override
  public ObjectInspector initialize(ObjectInspector[] arguments)
      throws UDFArgumentException {
    if (arguments.length != 2) {
      throw new UDFArgumentLengthException(
          "IN_FILE() accepts exactly 2 arguments.");
    }

    strObjectInspector = arguments[0];
    fileObjectInspector = arguments[1];

    if (!isTypeCompatible(strObjectInspector)) {
      throw new UDFArgumentTypeException(0, "The first " +
        "argument of function IN_FILE must be a string, " +
        "char or varchar but " +
        strObjectInspector.toString() + " was given.");
    }

    if (((PrimitiveObjectInspector) fileObjectInspector).getPrimitiveCategory() !=
          PrimitiveObjectInspector.PrimitiveCategory.STRING ||
      !ObjectInspectorUtils.isConstantObjectInspector(fileObjectInspector)) {
      throw new UDFArgumentTypeException(1, "The second " +
        "argument of IN_FILE() must be a constant string but " +
        fileObjectInspector.toString() + " was given.");
    }

    return PrimitiveObjectInspectorFactory.javaBooleanObjectInspector;
  }
IN_FILE(str, filename) returns true if 'str' appears in the file specified
by 'filename'.  A string is considered to be in the file if it that string
appears as a line in the file.

If either argument is NULL then NULL is returned.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java