public static boolean sameClass(Node left, Node right) {
    if (left == right) {
      return true;
    }

    return left.getClass() == right.getClass();
  }
Compare with another node by considering internal state excluding any Node returned by
getChildren()
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Node.java