maropu commented on a change in pull request #28840:
URL: https://github.com/apache/spark/pull/28840#discussion_r443216217



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -1341,6 +1341,16 @@ class SessionCatalog(
     functionRegistry.registerFunction(func, info, builder)
   }
 
+  /**
+   * Unregister a temporary or permanent function from a session-specific 
[[FunctionRegistry]]
+   */
+  def unregisterFunction(name: FunctionIdentifier): Unit = {
+    if (!functionRegistry.dropFunction(name)) {
+      throw new NoSuchFunctionException(

Review comment:
       Actually, it does not throw this exception because this check's already 
done in 
https://github.com/apache/spark/pull/28840/files#diff-d2a203f08c862bd762e6740c16e972f7R267-R268
 ?




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to