maropu commented on a change in pull request #29054:
URL: https://github.com/apache/spark/pull/29054#discussion_r452627861
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDAFSuite.scala
##########
@@ -161,6 +161,21 @@ class HiveUDAFSuite extends QueryTest
checkAnswer(sql("select histogram_numeric(a,2) from abc where a=3"),
Row(null))
}
}
+
+ test("Hive mode use spark udaf should show error") {
+ val functionName = "longProductSum"
+ val functionClass = "org.apache.spark.sql.hive.execution.LongProductSum"
+ withUserDefinedFunction(functionName -> true) {
+ sql(s"CREATE TEMPORARY FUNCTION $functionName AS '$functionClass'")
+ val e1 = intercept[AnalysisException] {
Review comment:
nit: `e1` -> `e`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]