wangyum commented on a change in pull request #30665:
URL: https://github.com/apache/spark/pull/30665#discussion_r539310311



##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
##########
@@ -2132,11 +2132,9 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils 
with TestHiveSingleton {
            |AS 'org.apache.spark.sql.hive.execution.UDTFStack2'
            |USING JAR '${hiveContext.getHiveFile("SPARK-21101-1.0.jar").toURI}'
         """.stripMargin)
-      val e = intercept[org.apache.spark.sql.AnalysisException] {
-        sql("SELECT udtf_stack2(2, 'A', 10, date '2015-01-01', 'B', 20, date 
'2016-01-01')")
-      }
-      assert(
-        e.getMessage.contains("public StructObjectInspector 
initialize(ObjectInspector[] args)"))
+      val num =
+        sql("SELECT udtf_stack2(2, 'A', 10, date '2015-01-01', 'B', 20, date 
'2016-01-01')").count()
+      assert(num === 2)

Review comment:
       How about?
   ```scala
   checkAnswer(
     sql("SELECT udtf_stack2(2, 'A', 10, date '2015-01-01', 'B', 20, date 
'2016-01-01')"),
     Seq(Row("A", 10, java.sql.Date.valueOf("2015-01-01")),
       Row("B", 20, java.sql.Date.valueOf("2016-01-01"))))
   ```




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

Reply via email to