@Override
    public Expression next() {
      if (!hasNext()) {
        throw new NoSuchElementException();
      }
      Expression current = queue.pop();
      if (current != null) {
        for (Expression subExp : current.getExpressions()) {
          queue.push(subExp);
        }
      }
      return current;
    }
the iterator of an Expression tree with level-order traversal
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/Expression.java