private List<IDataSchema> fetchSchemaForTableModel(TCreateTrainingReq req) {
    List<IDataSchema> dataSchemaList = new ArrayList<>();
    TDataSchemaForTable dataSchemaForTable = req.getDataSchemaForTable();
    if (req.useAllData || !dataSchemaForTable.getDatabaseList().isEmpty()) {
      List<String> databaseNameList = new ArrayList<>();
      if (req.useAllData) {
        TShowDatabaseResp resp = showDatabase(new TGetDatabaseReq());
        databaseNameList.addAll(resp.getDatabaseInfoMap().keySet());
      } else {
        databaseNameList.addAll(dataSchemaForTable.getDatabaseList());
      }

      for (String database : databaseNameList) {
        TShowTableResp resp = showTables(database, false);
        for (TTableInfo tableInfo : resp.getTableInfoList()) {
          dataSchemaList.add(new IDataSchema(database + DOT + tableInfo.tableName));
        }
      }
    }
    for (String tableName : dataSchemaForTable.getTableList()) {
      dataSchemaList.add(new IDataSchema(dataSchemaForTable.curDatabase + DOT + tableName));
    }
    return dataSchemaList;
  }
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