Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/12036#discussion_r57943772
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
---
@@ -52,6 +53,15 @@ trait FunctionRegistry {
/** Drop a function and return whether the function existed. */
def dropFunction(name: String): Boolean
+ /* Return the FunctionBuilder and ExpressionInfo for the specified
function name and classname. */
+ def makeFunctionBuilderAndInfo(
+ name: String,
+ functionClassName: String): (ExpressionInfo, FunctionBuilder) = {
+ val clazz =
Utils.getContextOrSparkClassLoader.loadClass(functionClassName)
+ val (_, (info, builder)) =
+ FunctionRegistry.expression(name,
clazz.asInstanceOf[Class[Expression]])
--- End diff --
Instead I would just throw unsupported operation exception for now (e.g.
what I do in #12051). This was never supported in the first place so we don't
have to implement it now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]