private static boolean canReplaceParentWithChildPartioning(Integer moveColTo, List<ExprNodeDesc> cpars,
      List<ExprNodeDesc> ppars) {
    return moveColTo < 0 && (cpars != null && !cpars.isEmpty()) || moveColTo > 0 && (ppars == null || ppars.isEmpty());
  }
Checks if the partitioning columns of the child RS can replace the columns of the parent RS.

The replacement can be done in two cases:
<ul>
  <li>Parent RS columns are more specific than those of the child RS, and child columns are assigned;</li>
  <li>Child RS columns are more specific than those of the parent RS, and parent columns are not assigned.</li>
</ul>

@param moveColTo -1 if parent columns are more specific, 1 if child columns are more specific, 0 if the columns are
equal
@param cpars the child RS partitioning columns
@param ppars the parent RS partitioning columns
@return
 true if the partitioning columns of the child RS can replace the columns of the parent RS and false otherwise
ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/ReduceSinkDeDuplicationUtils.java