pbanakar commented on code in PR #3906:
URL: https://github.com/apache/fluss/pull/3906#discussion_r3744489820


##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java:
##########
@@ -802,18 +802,27 @@ public void alterPartition(
     @Override
     public List<String> listFunctions(String dbName)
             throws DatabaseNotExistException, CatalogException {
+        if (!databaseExists(dbName)) {
+            throw new DatabaseNotExistException(getName(), dbName);
+        }
         return new ArrayList<>(BUILTIN_BITMAP_FUNCTIONS.keySet());
     }
 
     @Override
     public boolean functionExists(ObjectPath objectPath) throws 
CatalogException {
+        if (!databaseExists(objectPath.getDatabaseName())) {
+            return false;
+        }
         return BUILTIN_BITMAP_FUNCTIONS.containsKey(
                 objectPath.getObjectName().toLowerCase(Locale.ROOT));
     }
 
     @Override
     public CatalogFunction getFunction(ObjectPath functionPath)
             throws FunctionNotExistException, CatalogException {
+        if (!databaseExists(functionPath.getDatabaseName())) {
+            throw new FunctionNotExistException(getName(), functionPath);

Review Comment:
   Updated getFunction to throw CatalogException with an explicit "Database X 
does not exist in catalog Y" message when the database is not found,



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