KurtYoung commented on a change in pull request #8275: [FLINK-11519][table] Add
function related catalog APIs
URL: https://github.com/apache/flink/pull/8275#discussion_r278816704
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ReadableWritableCatalog.java
##########
@@ -195,4 +197,47 @@ void dropPartition(ObjectPath tablePath,
CatalogPartitionSpec partitionSpec, boo
void alterPartition(ObjectPath tablePath, CatalogPartitionSpec
partitionSpec, CatalogPartition newPartition, boolean ignoreIfNotExists)
throws TableNotExistException, TableNotPartitionedException,
PartitionSpecInvalidException, PartitionNotExistException, CatalogException;
+ // ------ functions ------
+
+ /**
+ * Create a function.
+ *
+ * @param functionPath path of the function
+ * @param function the function to be created
+ * @param ignoreIfExists flag to specify behavior if a table/view
with the given name already exists:
+ * if set to false, it throws a
TableAlreadyExistException,
+ * if set to true, nothing happens.
+ * @throws FunctionAlreadyExistException if the function already exist
+ * @throws DatabaseNotExistException if the function does not exist
+ * @throws CatalogException in case of any runtime exception
+ */
+ void createFunction(ObjectPath functionPath, CatalogFunction function,
boolean ignoreIfExists)
+ throws FunctionAlreadyExistException,
DatabaseNotExistException, CatalogException;
+
+ /**
+ * Modify an existing function.
+ *
+ * @param functionPath path of the function
+ * @param newFunction the function to be modified
+ * @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 exist
+ * @throws CatalogException in case of any runtime exception
+ */
+ void alterFunction(ObjectPath functionPath, CatalogFunction
newFunction, boolean ignoreIfNotExists)
+ throws FunctionNotExistException, CatalogException;
+
+ /**
+ * Drop a function.
+ *
+ * @param functionPath path of the function to be dropped
+ * @param ignoreIfNotExists plag to specify behavior if the database
does not exist:
Review comment:
database -> function
----------------------------------------------------------------
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