@Override
    void copy(VectorizedRowBatch inBatch, int inBatchIndex, VectorizedRowBatch outBatch, int outBatchIndex) {
      BytesColumnVector inColVector = (BytesColumnVector) inBatch.cols[inColumnIndex];
      BytesColumnVector outColVector = (BytesColumnVector) outBatch.cols[outColumnIndex];

      if (inColVector.isRepeating) {
        if (inColVector.noNulls || !inColVector.isNull[0]) {
          outColVector.setVal(outBatchIndex, inColVector.vector[0], inColVector.start[0], inColVector.length[0]);
          outColVector.isNull[outBatchIndex] = false;
        } else {
          VectorizedBatchUtil.setNullColIsNullValue(outColVector, outBatchIndex);
        }
      } else {
        if (inColVector.noNulls || !inColVector.isNull[inBatchIndex]) {
          outColVector.setVal(outBatchIndex, inColVector.vector[inBatchIndex], inColVector.start[inBatchIndex], inColVector.length[inBatchIndex]);
          outColVector.isNull[outBatchIndex] = false;
        } else {
          VectorizedBatchUtil.setNullColIsNullValue(outColVector, outBatchIndex);
        }
      }
    }
This class copies specified columns of a row from one VectorizedRowBatch to another.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorCopyRow.java