dawidwys commented on a change in pull request #9937: [FLINK-14416][table] Add
Module interface and ModuleManager
URL: https://github.com/apache/flink/pull/9937#discussion_r338924122
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java
##########
@@ -103,6 +106,23 @@ static TableEnvironment create(EnvironmentSettings
settings) {
*/
Optional<Catalog> getCatalog(String catalogName);
+ /**
+ * Loads a {@link Module} under a unique name. Modules will be kept in
the loaded order.
+ *
+ * @param moduleName name of the {@link Module}
+ * @param module the module instance
+ * @throws ModuleAlreadyExistException thrown when there is already a
module with the same name
+ */
+ void loadModule(String moduleName, Module module) throws
ModuleAlreadyExistException;
Review comment:
Do we really need a specific exception for it? Isn't `ValidationException`
enough? What benefit do we get with a `ModuleException`? The
`ValidationException`/`TableException` clearly separates user-side errors from
system-side errors. If you really want to introduce additional exception let's
try to maintain this distinction.
BTW, regarding the exceptions in Catalog API, I had a few discussions with
@twalthr before and we both agree that at some point we should decrease the
number of exceptions being thrown from the Catalog API. As of now it is not a
very user friendly API in that regard. Therefore I would not take it as an
example.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services