[ https://issues.apache.org/jira/browse/FLINK-10696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672018#comment-16672018 ]
ASF GitHub Bot commented on FLINK-10696: ---------------------------------------- xuefuz commented on a change in pull request #6970: [FLINK-10696][Table API & SQL]Add APIs to ExternalCatalog, CrudExternalCatalog and InMemoryCrudExternalCatalog for views and UDFs URL: https://github.com/apache/flink/pull/6970#discussion_r230159488 ########## File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/catalog/CrudExternalCatalog.scala ########## @@ -103,4 +105,86 @@ trait CrudExternalCatalog extends ExternalCatalog { @throws[CatalogNotExistException] def alterSubCatalog(name: String, catalog: ExternalCatalog, ignoreIfNotExists: Boolean): Unit + /** + * Adds a view to this catalog. + * + * @param viewName The name of the view to add. + * @param view The view to add. + * @param ignoreIfExists Flag to specify behavior if a view with the given name already exists: + * if set to false, throw an exception, + * if set to true, nothing happens. + * @throws ViewAlreadyExistException thrown if view already exists and ignoreIfExists is false + */ + @throws[ViewAlreadyExistException] + def createView(viewName: String, view: String, ignoreIfExists: Boolean): Unit + + /** + * Deletes a view from this catalog. + * + * @param viewName Name of the view to delete. + * @param ignoreIfNotExists Flag to specify behavior if the view does not exist: + * if set to false, throw an exception, + * if set to true, nothing happens. + * @throws ViewNotExistException thrown if the view does not exist in the catalog + */ + @throws[ViewNotExistException] + def dropView(viewName: String, ignoreIfNotExists: Boolean): Unit + + /** + * Modifies an existing view of this catalog. + * + * @param viewName The name of the view to modify. + * @param view The new view which replaces the existing table. + * @param ignoreIfNotExists Flag to specify behavior if the view does not exist: + * if set to false, throw an exception, + * if set to true, nothing happens. + * @throws ViewNotExistException thrown if the view does not exist in the catalog + */ + @throws[ViewNotExistException] + def alterView(viewName: String, view: String, ignoreIfNotExists: Boolean): Unit + + /** + * Adds a UDF to this catalog. + * + * @param functionName The name of the function to add. + * @param function The function to add. + * @param ignoreIfExists Flag to specify behavior if function with the given name already exists: + * if set to false, throw an exception, + * if set to true, nothing happens. + * @throws FunctionAlreadyExistException thrown if function already exists and ignoreIfExists + * is false + */ + @throws[FunctionAlreadyExistException] + def createFunction( + functionName: String, + function: UserDefinedFunction, + ignoreIfExists: Boolean): Unit + + /** + * Deletes a UDF from this catalog. + * + * @param functionName Name of the function to delete. + * @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 thrown if the function does not exist in the catalog + */ + @throws[FunctionNotExistException] + def dropFunction(functionName: String, ignoreIfNotExists: Boolean): Unit + + /** + * Modifies an existing UDF of this catalog. + * + * @param functionName The name of the function to modify. + * @param function The new function which replaces the existing table. Review comment: Same typo as above ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > Add APIs to ExternalCatalog for views and UDFs > ---------------------------------------------- > > Key: FLINK-10696 > URL: https://issues.apache.org/jira/browse/FLINK-10696 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Affects Versions: 1.6.1 > Reporter: Xuefu Zhang > Assignee: Bowen Li > Priority: Major > Labels: pull-request-available > Fix For: 1.8.0 > > > Currently there are APIs for tables only. However, views and UDFs are also > common objects in a catalog. > This is required when we store Flink tables/views/UDFs in an external > persistent storage. -- This message was sent by Atlassian JIRA (v7.6.3#76005)