public static void processVectorInspector(
      StructObjectInspector structObjInspector,
      SingleOIDClosure closure)
      throws HiveException {
    List<? extends StructField> fields = structObjInspector.getAllStructFieldRefs();
    VectorExpressionWriter[] writers = new VectorExpressionWriter[fields.size()];
    List<ObjectInspector> oids = new ArrayList<ObjectInspector>(writers.length);
    ArrayList<String> columnNames = new ArrayList<String>();
    int i = 0;
    for(StructField field : fields) {
      ObjectInspector fieldObjInsp = TypeInfoUtils.getStandardWritableObjectInspectorFromTypeInfo(
                TypeInfoUtils.getTypeInfoFromObjectInspector(field.getFieldObjectInspector()));
      writers[i] = VectorExpressionWriterFactory.
                genVectorExpressionWritable(fieldObjInsp);
      columnNames.add(field.getFieldName());
      oids.add(writers[i].getObjectInspector());
      i++;
    }
    ObjectInspector objectInspector = ObjectInspectorFactory.
        getStandardStructObjectInspector(columnNames,oids);
    closure.assign(writers, objectInspector);
  }
Creates the value writers for an struct object inspector.
Creates an appropriate output object inspector.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java