viirya commented on a change in pull request #28983:
URL: https://github.com/apache/spark/pull/28983#discussion_r449404640
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -679,7 +679,10 @@ object MapObjects {
elementNullable: Boolean = true,
customCollectionCls: Option[Class[_]] = None): MapObjects = {
val loopVar = LambdaVariable("MapObject", elementType, elementNullable)
- MapObjects(loopVar, function(loopVar), inputData, customCollectionCls)
+ // println(s"\n\n $function, $inputData, $elementType, $elementNullable,
$customCollectionCls \n")
+ val fOfLV = if (function == null) loopVar else function(loopVar)
Review comment:
Looks not correct fix as this only works if `function` is just
"identity"?
`UnresolvedMapObjects` was added long while ago, and for the transient
`function`, seems it was added without test case. So I can just tell from the
code comment, I guess that that `UnresolvedMapObjects` should not be resolved
and evaluated on executors.
----------------------------------------------------------------
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]