private int[] determineKeyColumnsWithoutOrderColumns(int[] keyInputColumnMap,
      int[] orderColumnMap) {
    List<Integer> keyColumnsWithoutOrderColumns =
        IntStream.of(keyInputColumnMap).boxed().collect(Collectors.toList());
    List<Integer> orderColumns = IntStream.of(orderColumnMap).boxed().collect(Collectors.toList());
    keyColumnsWithoutOrderColumns.removeAll(orderColumns);

    return Ints.toArray(keyColumnsWithoutOrderColumns);
  }
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