yujiantao opened a new issue, #7835:
URL: https://github.com/apache/gravitino/issues/7835

   ### Describe the feature
   
   I plan to add view and function management framework in gravitino as the 
following design.  
   
   <img width="1738" height="832" alt="Image" 
src="https://github.com/user-attachments/assets/84d24f9e-c972-4f41-bbcc-802989ca13c3";
 />
   
   1. Add SupportViews and SupportFunctions interface
   public interface SupportViews extends Closeable {
         NameIdentifier[] listViews(Namespace namespace) throws 
NoSuchCatalogException;
         default boolean viewExists(NameIdentifier ident);
         View createView(NameIdentifier ident, String comment, Map<String, 
String> properties)
         View alterView(NameIdentifier ident, ViewChange... changes) throws 
NoSuchViewException;
         boolean dropView(NameIdentifier ident, boolean cascade) throws 
NonEmptyViewException;
   }
   
   public interface SupportFunctions extends Closeable {
       NameIdentifier[] listFunctions(Namespace namespace) throws 
NoSuchCatalogException;
       default boolean functionExists(NameIdentifier ident);
       Function createFunction(NameIdentifier ident, String comment, 
Map<String, String> properties)
       Function alterFunction(NameIdentifier ident, FunctionChange... changes) 
throws NoSuchFunctionException;
       boolean dropFunction(NameIdentifier ident, boolean cascade) throws 
NonEmptyFunctionException;
   }
   
   2. Implement above interfaces for catalogs 
   public class HiveCatalogOperations implements CatalogOperations, 
SupportsSchemas, TableCatalog, SupportViews, SupportFunctions 
   
   public class IcebergCatalogOperations implements CatalogOperations, 
SupportsSchemas, TableCatalog, SupportViews, SupportFunctions
   
   
   3. Provide rest api for view and function
   @Path("metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/views")
   public class ViewsOperations 
   
   @Path("metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/functinos")
   public class FunctionOperations 
   
   ### Motivation
   
   _No response_
   
   ### Describe the solution
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to