lasdf1234 commented on code in PR #11845:
URL: https://github.com/apache/gravitino/pull/11845#discussion_r3614324949


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/paimon/GravitinoPaimonCatalog.java:
##########
@@ -84,4 +88,9 @@ public boolean dropTable(Identifier ident) {
         .asTableCatalog()
         .purgeTable(NameIdentifier.of(getDatabase(ident), ident.name()));
   }
+
+  @Override
+  public Procedure loadProcedure(Identifier identifier) throws 
NoSuchProcedureException {
+    return ((SparkBaseCatalog) sparkCatalog).loadProcedure(identifier);
+  }

Review Comment:
    @Override
     public Procedure loadProcedure(Identifier identifier) throws 
NoSuchProcedureException {
       String[] namespace = identifier.namespace();
       if (namespace.length == 1 && 
Catalog.SYSTEM_DATABASE_NAME.equals(namespace[0])) {
         ProcedureBuilder builder = 
SparkProcedures.newBuilder(identifier.name());
         if (builder != null) {
           return builder.withTableCatalog(this).build();
         }
       }
       throw new NoSuchProcedureException(identifier);
     }
   
   
   Would it be better to write like this? This will let Gravitino's own catalog 
(GravitinoPaimonCatalog) serve as the ProcedureCatalog. How do you think? 



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