You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/10 05:22:51 UTC

[GitHub] [spark] maropu commented on a change in pull request #29054: [SPARK-32243][SQL]HiveSessionCatalog call super.makeFunctionExpression should show error message

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org