Rebased HIVE-5149 ReduceSinkDeDuplication can pick the wrong partitioning columns