ConeyLiu commented on code in PR #42629:
URL: https://github.com/apache/spark/pull/42629#discussion_r1304499292
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2FunctionSuite.scala:
##########
@@ -322,14 +321,7 @@ class DataSourceV2FunctionSuite extends
DatasourceV2SQLBase {
test("scalar function: bad magic method") {
catalog("testcat").asInstanceOf[SupportsNamespaces].createNamespace(Array("ns"),
emptyProps)
addFunction(Identifier.of(Array("ns"), "strlen"), StrLen(StrLenBadMagic))
- // TODO assign a error-classes name
- checkError(
- exception = intercept[SparkException] {
- sql("SELECT testcat.ns.strlen('abc')").collect()
- },
- errorClass = null,
- parameters = Map.empty
- )
+ intercept[UnsupportedOperationException](sql("SELECT
testcat.ns.strlen('abc')").collect())
Review Comment:
`checkError` require an exception with the type of `SparkThrowable`
--
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]