panbingkun commented on code in PR #47293:
URL: https://github.com/apache/spark/pull/47293#discussion_r1673460712
##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala:
##########
@@ -854,12 +863,13 @@ class HiveQuerySuite extends HiveComparisonTest with
SQLTestUtils with BeforeAnd
val funcJar = TestHive.getHiveFile("TestUDTF.jar")
val jarURL = funcJar.toURI.toURL
sql(s"ADD JAR $jarURL")
- sql(
- """CREATE TEMPORARY FUNCTION udtf_count2 AS
- |'org.apache.spark.sql.hive.execution.GenericUDTFCount2'
- """.stripMargin)
- assert(sql("DESCRIBE FUNCTION udtf_count2").count() > 1)
- sql("DROP TEMPORARY FUNCTION udtf_count2")
+ withUserDefinedFunction("udtf_count2" -> true) {
Review Comment:
Use `withUserDefinedFunction`
--
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]