cloud-fan commented on code in PR #41932:
URL: https://github.com/apache/spark/pull/41932#discussion_r1263218083


##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala:
##########
@@ -552,6 +552,14 @@ class HiveUDFSuite extends QueryTest with 
TestHiveSingleton with SQLTestUtils {
     }
   }
 
+  test("Invoke a persist hive function with call_function") {
+    val testData = spark.range(5).repartition(1)
+    withUserDefinedFunction("custom_func" -> false) {
+      sql(s"CREATE FUNCTION custom_func AS 
'${classOf[GenericUDAFAverage].getName}'")
+      checkAnswer(testData.select(call_function("custom_func", $"id")), 
Row(2.0))

Review Comment:
   can we also test calling the function with the qualified name? 
`spark_catalog.default.custom_func`



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