public void appendPathPattern(PartialPath pathPattern) {
    if (useWildcard) {
      boolean isExist = false;
      for (PartialPath path : pathPatternList) {
        if (path.include(pathPattern)) {
          // path already exists in pathPatternList
          isExist = true;
          break;
        }
      }
      if (!isExist) {
        // remove duplicate path in pathPatternList
        pathPatternList.removeIf(pathPattern::include);
        pathPatternList.add(pathPattern);
      }
    } else {
      appendBranchWithoutPrune(root, pathPattern.getNodes(), 0);
    }
  }
Add a pathPattern (may contain wildcards) to pathPatternList.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PathPatternTree.java