@Override public StructObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {
    LOG.debug("initializing GenericUDFGetSplits2");
    validateInput(arguments);

    List<String> names = Arrays.asList("type", "split");
    List<ObjectInspector> fieldOIs = Arrays.asList(PrimitiveObjectInspectorFactory.javaStringObjectInspector,
        PrimitiveObjectInspectorFactory.javaByteArrayObjectInspector);
    StructObjectInspector outputOI = ObjectInspectorFactory.getStandardStructObjectInspector(names, fieldOIs);

    LOG.debug("done initializing GenericUDFGetSplits2");
    return outputOI;
  }
GenericUDTFGetSplits2 -  Memory efficient version of GenericUDTFGetSplits.
It separates out information like schema and planBytes[] which is common to all the splits.
This produces output in following format.
<p>
type                           split
----------------------------------------------------
schema-split             LlapInputSplit -- contains only schema
plan-split               LlapInputSplit -- contains only planBytes[]
0                        LlapInputSplit -- actual split 1
1                        LlapInputSplit -- actual split 2
...                         ...
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits2.java