cloud-fan commented on a change in pull request #29502:
URL: https://github.com/apache/spark/pull/29502#discussion_r482081195
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -1369,6 +1369,20 @@ class SessionCatalog(
functionRegistry.registerFunction(func, info, builder)
}
+ /**
+ * Make sure function class is on the classpath.
+ */
+ def requireFunctionClassExists(funcDefinition: CatalogFunction): Unit = {
+ val className = funcDefinition.className
+ if (!Utils.classIsLoadable(className)) {
Review comment:
can we reuse the code with `registerFunction`?
----------------------------------------------------------------
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]