public static void acidAddRowToBatch(Object row,
                                       StructObjectInspector oi,
                                       int rowIndex,
                                       VectorizedRowBatch batch,
                                       VectorizedRowBatchCtx context,
                                       DataOutputBuffer buffer) throws HiveException {
    List<? extends StructField> fieldRefs = oi.getAllStructFieldRefs();
    // Iterate thru the cols and load the batch
    for (int i = 0; i < fieldRefs.size(); i++) {
      if (batch.cols[i] == null) {
        // This means the column was not included in the projection from the underlying read
        continue;
      }
      if (context.isPartitionCol(i)) {
        // The value will have already been set before we're called, so don't overwrite it
        continue;
      }
      setVector(row, oi, fieldRefs.get(i), batch, buffer, rowIndex, i, 0);
    }
  }
Iterates thru all the columns in a given row and populates the batch
from a given offset

@param row Deserialized row object
@param oi Object insepector for that row
@param rowIndex index to which the row should be added to batch
@param batch Vectorized batch to which the row is added at rowIndex
@param context context object for this vectorized batch
@param buffer
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedBatchUtil.java