public final boolean logicalEqualsTree(Operator<?> o) {
    // XXX: this could easily become a hot-spot
    if (!logicalEquals(o)) {
      return false;
    }
    if (o.getNumParent() != getNumParent()) {
      return false;
    }
    for (int i = 0; i < getNumParent(); i++) {
      Operator<? extends OperatorDesc> copL = parentOperators.get(i);
      Operator<? extends OperatorDesc> copR = o.parentOperators.get(i);
      if (!copL.logicalEquals(copR)) {
        return false;
      }
    }
    return true;
  }
Compares the whole operator tree with the other.
ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java