private static boolean hasSameTopNKeyDesc(Operator<? extends OperatorDesc> operator, TopNKeyDesc desc) {
    if (!(operator instanceof TopNKeyOperator)) {
      return false;
    }

    final TopNKeyOperator topNKey = (TopNKeyOperator) operator;
    final TopNKeyDesc opDesc = topNKey.getConf();
    return opDesc.isSame(desc);
  }
Push through another Top N Key operator.
If the TNK operators are the same one of them will be removed. See {@link TopNKeyDesc#isSame}
else If expression in <code>topnKey</code> is a common prefix in it's parent TNK op and topN property is same
then <code>topnkey</code> could be pushed through parent.
If the Top N Key operator can not be pushed through this method tries to remove one of them:
- if topN property is the same and the keys of one of the operators are subset of the other then the operator
  can be removed
- if the keys are the same operator with higher topN value can be removed
@param topNKey TopNKey operator to push
@throws SemanticException when removeChildAndAdoptItsChildren was not successful
ql/src/java/org/apache/hadoop/hive/ql/optimizer/topnkey/TopNKeyPushdownProcessor.java