You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/12 07:28:07 UTC
[GitHub] [spark] viirya commented on a change in pull request #32519: [SPARK-35347][SQL][FOLLOWUP] Throw exception when cannot find the method
viirya commented on a change in pull request #32519:
URL: https://github.com/apache/spark/pull/32519#discussion_r630791547
##########
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:
Fix together? Or another minor PR as this is a followup only.
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org