spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] cloud-fan commented on a change in pull request #29502: [SPARK-32677][SQL] Load function resource before create
Date Wed, 02 Sep 2020 09:08:48 GMT

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message