@Override
  public TFetchTableResp fetchTables(final Map<String, Set<String>> fetchTableMap) {
    final TSStatus status = confirmLeader();
    return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
        ? clusterSchemaManager.fetchTables(
            fetchTableMap.entrySet().stream()
                .filter(
                    entry -> {
                      entry
                          .getValue()
                          .removeIf(
                              table ->
                                  procedureManager
                                      .checkDuplicateTableTask(
                                          entry.getKey(), null, table, null, null)
                                      .getRight());
                      return true;
                    })
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)))
        : new TFetchTableResp(status);
  }
Get all related dataRegion which may contains the data of specific timeseries matched by given
patternTree
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java