public static void addProjectedRowToBatchFrom(Object row, StructObjectInspector oi,
      int rowIndex, VectorizedRowBatch batch, DataOutputBuffer buffer) throws HiveException {
    List<? extends StructField> fieldRefs = oi.getAllStructFieldRefs();
    for (int i = 0; i < fieldRefs.size(); i++) {
      int projectedOutputCol = batch.projectedColumns[i];
      if (batch.cols[projectedOutputCol] == null) {
        continue;
      }
      setVector(row, oi, fieldRefs.get(i), batch, buffer, rowIndex, projectedOutputCol, 0);
    }
  }
Add only the projected column of a regular row to the specified vectorized row batch
@param row the regular row
@param oi object inspector for the row
@param rowIndex the offset to add in the batch
@param batch vectorized row batch
@param buffer data output buffer
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedBatchUtil.java