cloud-fan commented on code in PR #37301:
URL: https://github.com/apache/spark/pull/37301#discussion_r930111496
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowFunctionsSuiteBase.scala:
##########
@@ -141,48 +138,35 @@ trait ShowFunctionsSuiteBase extends QueryTest with
DDLCommandTestUtils {
funs.foreach(createFunction)
QueryTest.checkAnswer(
sql(s"SHOW USER FUNCTIONS IN $ns LIKE '*'"),
- testFuns.map(testFun => Row(showFun("ns", testFun))))
+ testFuns.map(testFun => Row(qualifiedFunName("ns", testFun))))
QueryTest.checkAnswer(
sql(s"SHOW USER FUNCTIONS IN $ns LIKE '*rc*'"),
- Seq("crc32i", "crc16j").map(testFun => Row(showFun("ns", testFun))))
+ Seq("crc32i", "crc16j").map(testFun => Row(qualifiedFunName("ns",
testFun))))
}
}
test("show a function by its string name") {
- assume(!isTempFunctions())
val testFuns = Seq("crc32i", "crc16j")
withNamespaceAndFuns("ns", testFuns) { (ns, funs) =>
assert(sql(s"SHOW USER FUNCTIONS IN $ns").isEmpty)
funs.foreach(createFunction)
QueryTest.checkAnswer(
sql(s"SHOW USER FUNCTIONS IN $ns 'crc32i'"),
- Row(showFun("ns", "crc32i")) :: Nil)
+ Row(qualifiedFunName("ns", "crc32i")) :: Nil)
}
}
test("show functions matched to the '|' pattern") {
- assume(!isTempFunctions())
val testFuns = Seq("crc32i", "crc16j", "date1900", "Date1")
withNamespaceAndFuns("ns", testFuns) { (ns, funs) =>
assert(sql(s"SHOW USER FUNCTIONS IN $ns").isEmpty)
funs.foreach(createFunction)
QueryTest.checkAnswer(
sql(s"SHOW USER FUNCTIONS IN $ns LIKE 'crc32i|date1900'"),
- Seq("crc32i", "date1900").map(testFun => Row(showFun("ns", testFun))))
+ Seq("crc32i", "date1900").map(testFun => Row(qualifiedFunName("ns",
testFun))))
QueryTest.checkAnswer(
sql(s"SHOW USER FUNCTIONS IN $ns LIKE 'crc32i|date*'"),
- Seq("crc32i", "date1900", "Date1").map(testFun => Row(showFun("ns",
testFun))))
- }
- }
-
- test("show a function by its id") {
Review Comment:
Removing it because it's almost the same as `show a function in the USER
name space`
--
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]