cloud-fan commented on a change in pull request #29502:
URL: https://github.com/apache/spark/pull/29502#discussion_r481919641



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala
##########
@@ -76,14 +76,15 @@ case class CreateFunctionCommand(
   override def run(sparkSession: SparkSession): Seq[Row] = {
     val catalog = sparkSession.sessionState.catalog
     val func = CatalogFunction(FunctionIdentifier(functionName, databaseName), 
className, resources)
+    catalog.loadFunctionResources(resources)
+    // We fail fast if function class is not exists.
+    catalog.requireFunctionClassExists(func)

Review comment:
       is this needed? shouldn't `loadFunctionResources` already does the work?




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