private Object[] getPartitionKey() {
    final int count = partitionColumnMap.length;
    Object[] key = new Object[count];

    for (int i = 0; i < count; i++) {
      if (currentPartitionIsNull[i]) {
        key[i] = null;
        continue;
      }
      switch (partitionColumnVectorTypes[i]) {
      case LONG:
        key[i] = currentPartitionLongs[i];
        break;
      case DOUBLE:
        key[i] = currentPartitionDoubles[i];
        break;
      case BYTES:
        key[i] = new byte[currentPartitionByteLengths[i]];
        System.arraycopy(currentPartitionByteArrays[i], 0, key[i], 0,
            currentPartitionByteLengths[i]);
        break;
      case DECIMAL:
        key[i] = currentPartitionDecimals[i];
        break;
      case TIMESTAMP:
        key[i] = currentPartitionTimestamps[i];
        break;
      case INTERVAL_DAY_TIME:
        key[i] = currentPartitionIntervalDayTimes[i];
        break;
      default:
        throw new RuntimeException(
            "Unexpected column vector type " + partitionColumnVectorTypes[i]);
      }
    }

    return key;
  }
Let's say we have a typical ordering scenario where is 1 order column:
keyInputColumnMap: [0, 1] (-> key cols contain order cols)
orderColumnMap: [1]
The method returns the non-ordering key columns: [0]

This is typically needed when while forwarding batches and want to fill
only partitioning but non-ordering columns from buffered batches to the overflow batch,
as the buffered batches already contain ordering column which is used for range calculation.

Possible scenarios:
1. explicit partitioning and ordering column
select p_mfgr, p_name, p_retailprice, count(*) over(partition by p_mfgr order by p_date)
keyInputColumnMap: [0, 1]
orderColumnMap: [1]

2a. no explicit ordering col
select p_mfgr, p_name, p_retailprice, count(*) over(partition by p_mfgr)
keyInputColumnMap: [0]
orderColumnMap: [0]

2b. no explicit ordering col, another column (keyInput is 0th again)
select p_mfgr, p_name, p_retailprice, count(*) over(partition by p_name)
keyInputColumnMap: [0]
orderColumnMap: [0]

3. no explicit partitioning col (= constant partition expression)
select p_mfgr, p_name, p_retailprice, count(*) over(order by p_date)
keyInputColumnMap: [1]
orderColumnMap: [1]

4. constant present on the partitioning column
select p_mfgr, p_name, p_retailprice, count(*) over(partition by p_mfgr)
from vector_ptf_part_simple_orc where p_mfgr = "Manufacturer#1";
partitionExpressions: [ConstantVectorExpression(val Manufacturer#1) -> 6:string]
orderExpressions: [ConstantVectorExpression(val Manufacturer#1) -> 7:string]
keyInputColumnMap: []
orderColumnMap: [7]
@param keyInputColumnMap
@param orderColumnMap
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFOperator.java