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


With regards,
Apache Git Services

Reply via email to