maropu commented on a change in pull request #32519:
URL: https://github.com/apache/spark/pull/32519#discussion_r630794492



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -151,7 +151,7 @@ trait InvokeLike extends Expression with NonSQLExpression {
   final def findMethod(cls: Class[_], functionName: String, argClasses: 
Seq[Class[_]]): Method = {
     val method = MethodUtils.getMatchingAccessibleMethod(cls, functionName, 
argClasses: _*)
     if (method == null) {
-      sys.error(s"Couldn't find $functionName on $cls")
+      throw QueryExecutionErrors.methodNotDeclaredError(functionName)

Review comment:
       hm. I think either is okay, but how about assigning a new jira number 
for replacing all the `sys.error` in this file with `QueryExecutionErrors.xxx` 
methods?




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