@Override
  public TDatabaseSchemaResp getMatchedDatabaseSchemas(final TGetDatabaseReq req) {
    final PathPatternTree scope =
        req.getScopePatternTree() == null
            ? SchemaConstant.ALL_MATCH_SCOPE
            : PathPatternTree.deserialize(ByteBuffer.wrap(req.getScopePatternTree()));
    final GetDatabasePlan plan =
        new GetDatabasePlan(
            req.getDatabasePathPattern(),
            scope,
            req.isSetIsTableModel() && req.isIsTableModel(),
            false);
    final DatabaseSchemaResp databaseSchemaResp =
        (DatabaseSchemaResp) configManager.getMatchedDatabaseSchemas(plan);

    return databaseSchemaResp.convertToRPCStorageGroupSchemaResp();
  }
ConfigNodeRPCServer exposes the interface that interacts with the DataNode
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java