ClusterSchemaTree fetchSchemaOfFuzzyMatch(
      PathPatternTree patternTree,
      boolean withTags,
      boolean withTemplate,
      MPPQueryContext context) {
    Map<Integer, Template> templateMap = new HashMap<>();
    List<PartialPath> pathPatternList = patternTree.getAllPathPatterns();
    for (PartialPath pattern : pathPatternList) {
      templateMap.putAll(templateManager.checkAllRelatedTemplate(pattern));
    }
    return executeSchemaFetchQuery(
        new SeriesSchemaFetchStatement(
            patternTree, templateMap, withTags, false, withTemplate, false),
        context);
  }
This method is used for scenarios that patternTree may have wildcard or there's no need to
cache the result.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java