Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7248#discussion_r33999476
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala 
---
    @@ -133,6 +133,32 @@ class HiveUDFSuite extends QueryTest {
         TestHive.reset()
       }
     
    +  test("UDFToListString") {
    +    val testData = TestHive.sparkContext.parallelize(StringCaseClass("") 
:: Nil).toDF()
    +    testData.registerTempTable("inputTable")
    +
    +    sql(s"CREATE TEMPORARY FUNCTION testUDFToListString AS 
'${classOf[UDFToListString].getName}'")
    +    intercept[AnalysisException] {
    +      sql("SELECT testUDFToListString(s) FROM inputTable")
    +    }
    +
    +    sql("DROP TEMPORARY FUNCTION IF EXISTS testUDFToListString")
    +    TestHive.reset()
    +  }
    +
    +  test("UDFToListInt") {
    +    val testData = TestHive.sparkContext.parallelize(StringCaseClass("") 
:: Nil).toDF()
    +    testData.registerTempTable("inputTable")
    +
    +    sql(s"CREATE TEMPORARY FUNCTION testUDFToListInt AS 
'${classOf[UDFToListInt].getName}'")
    +    intercept[AnalysisException] {
    --- End diff --
    
    assign the result of this function to a variable and check that the message 
is correct.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to