ruanhang1993 commented on code in PR #23036: URL: https://github.com/apache/flink/pull/23036#discussion_r1270188313
########## flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/EnvironmentSettings.java: ########## @@ -59,9 +62,17 @@ public class EnvironmentSettings { private final ClassLoader classLoader; + private final @Nullable CatalogStore catalogStore; Review Comment: Why do we need to change `EnvironmentSettings`? I think we should create a catalog storage by the configuration instead of maintaining an instance here. ########## flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java: ########## @@ -196,4 +204,92 @@ public ClassLoader getUserClassLoader() { })) .collect(Collectors.toList()); } + + /** + * Finds and creates a {@link CatalogStore} using the provided {@link Configuration} and user + * classloader. + * + * <p>The configuration format should be as follows: + * + * <pre>{@code + * table.catalog-store.kind: {identifier} + * table.catalog-store.{identifier}.{param1}: xxx + * table.catalog-store.{identifier}.{param2}: xxx + * }</pre> + */ + public static CatalogStore findAndCreateCatalogStore( Review Comment: I think this part should be put into `FactoryUtil` in `flink-table-common`. ########## flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java: ########## @@ -390,6 +392,16 @@ default Table fromValues(AbstractDataType<?> rowType, Object... values) { */ void registerCatalog(String catalogName, Catalog catalog); Review Comment: `@Deprecated` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org