cloud-fan commented on a change in pull request #34303:
URL: https://github.com/apache/spark/pull/34303#discussion_r730718372



##########
File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
##########
@@ -119,10 +124,58 @@ private[sql] class HiveSessionCatalog(
       try {
         super.makeFunctionExpression(name, clazz, input)
       } catch {
-        // If `super.makeFunctionExpression` throw `InvalidUDFClassException`, 
we construct
-        // Hive UDF/UDAF/UDTF with function definition. Otherwise, we just 
throw it earlier.
+        // If `super.makeFunctionExpression` throw `InvalidUDFClassException`, 
we try to construct
+        // ScalaAggregator or Hive UDF/UDAF/UDTF with function definition. 
Otherwise,
+        // we just throw it earlier.
+        // Unfortunately we need to use reflection here because Aggregator
+        // and ScalaAggregator are defined in sql/core module.

Review comment:
       classes in sql/core are available in sql/hive. What's the problem you 
hit?




-- 
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]

Reply via email to