Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/8800#discussion_r40616293
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala
---
@@ -59,19 +59,34 @@ private[hive] class HiveFunctionRegistry(underlying:
analysis.FunctionRegistry)
val functionClassName = functionInfo.getFunctionClass.getName
- if (classOf[UDF].isAssignableFrom(functionInfo.getFunctionClass)) {
- HiveSimpleUDF(new HiveFunctionWrapper(functionClassName), children)
- } else if
(classOf[GenericUDF].isAssignableFrom(functionInfo.getFunctionClass)) {
- HiveGenericUDF(new HiveFunctionWrapper(functionClassName),
children)
- } else if (
-
classOf[AbstractGenericUDAFResolver].isAssignableFrom(functionInfo.getFunctionClass))
{
- HiveGenericUDAF(new HiveFunctionWrapper(functionClassName),
children)
- } else if
(classOf[UDAF].isAssignableFrom(functionInfo.getFunctionClass)) {
- HiveUDAF(new HiveFunctionWrapper(functionClassName), children)
- } else if
(classOf[GenericUDTF].isAssignableFrom(functionInfo.getFunctionClass)) {
- HiveGenericUDTF(new HiveFunctionWrapper(functionClassName),
children)
- } else {
- sys.error(s"No handler for udf ${functionInfo.getFunctionClass}")
+ try {
--- End diff --
Should we add a comment here to say that we do type checking inside hive
UDF class(such as `HiveSimpleUDF`) constructor?
---
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]