cloud-fan commented on code in PR #42661: URL: https://github.com/apache/spark/pull/42661#discussion_r1306914923
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala: ########## @@ -133,8 +138,13 @@ case class CallMethodViaReflection(children: Seq[Expression]) } i += 1 } - val ret = method.invoke(null, buffer : _*) - UTF8String.fromString(String.valueOf(ret)) + try { + val ret = method.invoke(null, buffer : _*) + UTF8String.fromString(String.valueOf(ret)) + } catch { + case _: Exception if !failOnError => Review Comment: shall we catch `NonFatal`? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org