Airblader commented on a change in pull request #17788:
URL: https://github.com/apache/flink/pull/17788#discussion_r749077975
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java
##########
@@ -520,6 +520,20 @@ void alterFunction(
void dropFunction(ObjectPath functionPath, boolean ignoreIfNotExists)
throws FunctionNotExistException, CatalogException;
+ /**
+ * Rename an existing function.
+ *
+ * @param functionPath path of the function to be renamed
+ * @param newFunctionName the new name of the function
+ * @param ignoreIfNotExists flag to specify behavior if the function does
not exist: if set to
+ * false, throw an exception if set to true, nothing happens
+ * @throws FunctionNotExistException if the function does not exists
+ * @throws FunctionAlreadyExistException if the function with
newFunctionName already exists
+ * @throws CatalogException in case of any runtime exception
+ */
+ void renameFunction(ObjectPath functionPath, String newFunctionName,
boolean ignoreIfNotExists)
Review comment:
You modified all the implementations within Flink, but `Catalog` is a
public API, so adding new methods is a breaking change, because user's custom
implementations will no longer work without modification. So yes, it'd be good
to default implement it as you showed in your comment, of course with a nice
message for the exception.
--
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]