dawidwys commented on a change in pull request #8404: [FLINK-11476][table] Create CatalogManager to manage multiple catalogs URL: https://github.com/apache/flink/pull/8404#discussion_r284851991
########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java ########## @@ -19,33 +19,35 @@ package org.apache.flink.table.catalog; import org.apache.flink.annotation.Internal; -import org.apache.flink.table.api.CatalogAlreadyExistsException; import org.apache.flink.table.api.CatalogNotExistException; -import org.apache.flink.table.api.ExternalCatalogAlreadyExistException; import org.apache.flink.table.api.TableSchema; import org.apache.flink.table.catalog.exceptions.CatalogException; -import org.apache.flink.table.catalog.exceptions.DatabaseNotExistException; import org.apache.flink.table.catalog.exceptions.TableNotExistException; +import org.apache.flink.table.factories.TableFactoryUtil; import org.apache.flink.table.operations.CatalogTableOperation; +import org.apache.flink.table.sinks.TableSink; import org.apache.flink.util.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; -import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; +import static java.lang.String.format; Review comment: I think we should apply common sense here. In my experience it makes it much cleaner when we statically import well known methods or constants (like e.g. `String.format()`/`Assert.assertTrue`\`Collectors.toList()` etc.). There is very little chance anyone will confuse ``` CatalogException(format( "A database with name [%s] does not exist in the catalog: [%s].", databaseName, currentCatalogName)) ``` with any other `format`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services