gavinchou commented on code in PR #34384: URL: https://github.com/apache/doris/pull/34384#discussion_r1604462412
########## fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java: ########## @@ -873,4 +892,75 @@ private static TFetchSchemaTableDataResult routineInfoMetadataResult(TSchemaTabl result.setStatus(new TStatus(TStatusCode.OK)); return result; } + + private static TFetchSchemaTableDataResult tableOptionsMetadataResult(TSchemaTableRequestParams params) { + if (!params.isSetCurrentUserIdent()) { + return errorResult("current user ident is not set."); + } + + TFetchSchemaTableDataResult result = new TFetchSchemaTableDataResult(); + List<TRow> dataBatch = Lists.newArrayList(); + List<Long> catalogIds = Env.getCurrentEnv().getCatalogMgr().getCatalogIds(); + for (Long catalogId : catalogIds) { + CatalogIf catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(catalogId); + List<Long> dbIds = catalog.getDbIds(); + for (Long dbId : dbIds) { + DatabaseIf database = catalog.getDbNullable(dbId); + List<TableIf> tables = database.getTables(); + for (TableIf table : tables) { + if (table instanceof OlapTable) { Review Comment: try negative predicate to save indention ```suggestion if (!(table instanceof OlapTable)) continue; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org