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

      if (inColVector.isRepeating) {
        if (inColVector.noNulls || !inColVector.isNull[0]) {
          outColVector.vector[outBatchIndex] = inColVector.vector[0];
          outColVector.isNull[outBatchIndex] = false;
        } else {
          VectorizedBatchUtil.setNullColIsNullValue(outColVector, outBatchIndex);
        }
      } else {
        if (inColVector.noNulls || !inColVector.isNull[inBatchIndex]) {
          outColVector.vector[outBatchIndex] = inColVector.vector[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