private static boolean areBacktrackedExprsCompatible(final List<ExprNodeDesc> orgexprs,
                                                       final List<ExprNodeDesc> backtrackedExprs) {
    if(backtrackedExprs == null || backtrackedExprs.size() != orgexprs.size()) {
      return false;
    }
    for(int i=0; i<orgexprs.size(); i++) {
      if(orgexprs.get(i) instanceof ExprNodeColumnDesc && backtrackedExprs.get(i) instanceof ExprNodeColumnDesc) {
        ExprNodeColumnDesc orgColExpr = (ExprNodeColumnDesc)orgexprs.get(i);
        ExprNodeColumnDesc backExpr = (ExprNodeColumnDesc)backtrackedExprs.get(i);
        String orgTabAlias = orgColExpr.getTabAlias();
        String backTabAlias = backExpr.getTabAlias();

        if(orgTabAlias != null && backTabAlias != null && !orgTabAlias.equals(backTabAlias)) {
          return false;
        }
      }
    }
    return true;
  }
Remove operator from the tree, disconnecting it from its
parents and children.
ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java