@Override
    public boolean hasNext() {
      if (nextMatchedChild == null) {
        try {
          getNext();
        } catch (Throwable e) {
          logger.warn(e.getMessage(), e);
          throw new RuntimeException(e.getMessage(), e);
        }
      }
      return nextMatchedChild != null;
    }
The method used for generating the result based on the matched node.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/tree/AbstractTreeVisitor.java