@Override
  public StructObjectInspector initialize(ObjectInspector[] argOIs) throws UDFArgumentException {
    ArrayList<String> fieldNames = new ArrayList<String>();
    ArrayList<ObjectInspector> fieldOIs = new ArrayList<ObjectInspector>();
    fieldNames.add("col1");
    fieldOIs.add(PrimitiveObjectInspectorFactory.javaIntObjectInspector);
    return ObjectInspectorFactory.getStandardStructObjectInspector(fieldNames,
        fieldOIs);
  }
GenericUDTFCount2 outputs the number of rows seen, twice. It's output twice
to test outputting of rows on close with lateral view.
contrib/src/java/org/apache/hadoop/hive/contrib/udtf/example/GenericUDTFCount2.java