private void setRepeatingColumn(Object partitionKey, VectorizedRowBatch targetBatch,
      int targetColumnNum) {
    ColumnVector targetColVector = targetBatch.cols[targetColumnNum];

    targetColVector.isRepeating = true;

    if (partitionKey == null) {
      targetColVector.noNulls = false;
      targetColVector.isNull[0] = true;
      return;
    }

    switch (targetColVector.type) {
    case LONG:
      ((LongColumnVector) targetColVector).vector[0] = (long) partitionKey;
      break;
    case DOUBLE:
      ((DoubleColumnVector) targetColVector).vector[0] = (double) partitionKey;
      break;
    case BYTES:
      ((BytesColumnVector) targetColVector).setRef(0, (byte[]) partitionKey, 0,
          ((byte[]) partitionKey).length);
      break;
    case DECIMAL:
      ((DecimalColumnVector) targetColVector).set(0, (HiveDecimalWritable) partitionKey);
      break;
    case TIMESTAMP:
      ((TimestampColumnVector) targetColVector).set(0, (Timestamp) partitionKey);
      break;
    case INTERVAL_DAY_TIME:
      ((IntervalDayTimeColumnVector) targetColVector).set(0, (HiveIntervalDayTime) partitionKey);
      break;
    case STRUCT:
    case LIST:
    case MAP:
    case UNION:
      // No complex type support for now.
    default:
      throw new RuntimeException("Unexpected column vector type " + targetColVector.type);
    }
  }
Returns the values of ordering columns from a given batch and given row in an Object[].
@param vectorizedRowBatch
@param rowIndexInBatch
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFGroupBatches.java