dengzhhu653 commented on code in PR #5275:
URL: https://github.com/apache/hive/pull/5275#discussion_r1628630566


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/database/drop/DropDatabaseAnalyzer.java:
##########
@@ -73,6 +74,11 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
           }
           outputs.add(new WriteEntity(table, lockType));
         }
+        // fetch all the functions in the database
+        List<Function> functions = db.getFunctionsInDb(databaseName, ".*");

Review Comment:
   On HS2 restart, we load all functions from HMS, 
   
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L364
   I think this call is much light weight than the `getAllTableObjects` in this 
method.
   Another point is the `drop database` is a long consuming call as expected 
and less frequent, I'm a little worry about if it's worth to add an extra API 
just to fetch all the functions in this database.  
   



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to