diqiu50 commented on code in PR #9493:
URL: https://github.com/apache/gravitino/pull/9493#discussion_r2638408924
##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/CatalogConnectorManager.java:
##########
@@ -193,23 +193,33 @@ public GravitinoMetalake retrieveMetalake(String
metalakeName) {
}
private void loadCatalogs(GravitinoMetalake metalake) {
- String[] catalogNames;
+ List<String> catalogNames;
try {
- catalogNames = metalake.listCatalogs();
+ catalogNames =
+ Arrays.stream(metalake.listCatalogs())
+ .filter(
+ id -> {
+ String catalogName = getTrinoCatalogName(metalake.name(),
id);
+ boolean skipCatalog = config.skipCatalog(catalogName);
+ if (skipCatalog) {
Review Comment:
I advise storing skipCatalog in memory instead of reading it from the
configuration every time.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]