yaooqinn commented on a change in pull request #32370:
URL: https://github.com/apache/spark/pull/32370#discussion_r622124890
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -129,7 +129,12 @@ trait InvokeLike extends Expression with NonSQLExpression {
// return null if one of arguments is null
null
} else {
- val ret = method.invoke(obj, args: _*)
+ val ret = try {
+ method.invoke(obj, args: _*)
+ } catch {
+ // Re-throw the original exception.
+ case e: java.lang.reflect.InvocationTargetException => throw e.getCause
Review comment:
nit: a potential NPE here:)
--
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]