sunchao commented on a change in pull request #32532:
URL: https://github.com/apache/spark/pull/32532#discussion_r631955485
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -145,12 +151,7 @@ trait InvokeLike extends Expression with NonSQLExpression {
case e: java.lang.reflect.InvocationTargetException if e.getCause !=
null =>
throw e.getCause
}
- val boxedClass = ScalaReflection.typeBoxedJavaMapping.get(dataType)
- if (boxedClass.isDefined) {
- boxedClass.get.cast(ret)
- } else {
- ret
- }
+ boxingFn(ret)
Review comment:
It's a bit misleading by looking at it, but in the call sites of
`invoke` we currently always pass `Expression.dataType` as its argument, so the
parameter is actually unnecessary. The same goes to `arguments`. To avoid
confusion I think we can just remove these two parameters.
--
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]