private <T extends PartialPath> void searchPathPattern(
      PathPatternNode<Void, VoidSerializer> node,
      Deque<String> ancestors,
      List<T> fullPaths,
      boolean asMeasurementPath) {
    if (node.isPathPattern()) {
      fullPaths.add((T) convertNodesToPartialPath(node, ancestors, asMeasurementPath));
      if (node.isLeaf()) {
        return;
      }
    }

    ancestors.push(node.getName());
    for (PathPatternNode<Void, VoidSerializer> child : node.getChildren().values()) {
      searchPathPattern(child, ancestors, fullPaths, asMeasurementPath);
    }
    ancestors.pop();
  }
Construct tree according to the pathPatternList.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PathPatternTree.java