hvanhovell commented on code in PR #47688:
URL: https://github.com/apache/spark/pull/47688#discussion_r1720322367
##########
sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala:
##########
@@ -212,3 +183,25 @@ private[sql] case class UserDefinedAggregator[IN, BUF,
OUT](
override def name: String = givenName.getOrElse(aggregator.name)
}
+
+private[sql] object UserDefinedFunctionUtils {
Review Comment:
Moved it.
##########
sql/core/src/main/scala/org/apache/spark/sql/UDFRegistration.scala:
##########
@@ -483,15 +485,15 @@ class UDFRegistration private[sql] (functionRegistry:
FunctionRegistry) extends
val udaf =
clazz.getConstructor().newInstance().asInstanceOf[UserDefinedAggregateFunction]
register(name, udaf)
} catch {
- case e: ClassNotFoundException => throw
QueryCompilationErrors.cannotLoadClassNotOnClassPathError(className)
- case e @ (_: InstantiationException | _: IllegalArgumentException) =>
+ case _: ClassNotFoundException => throw
QueryCompilationErrors.cannotLoadClassNotOnClassPathError(className)
+ case _: InstantiationException | _: IllegalArgumentException =>
throw
QueryCompilationErrors.classWithoutPublicNonArgumentConstructorError(className)
}
}
/**
* Register a deterministic Java UDF0 instance as user-defined function
(UDF).
- * @since 2.3.0
+ * @since 1.3.0
Review Comment:
Fixed.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]