dongjoon-hyun commented on a change in pull request #28983:
URL: https://github.com/apache/spark/pull/28983#discussion_r449275392
##########
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)
+ // MapObjects(loopVar, function(loopVar), inputData, customCollectionCls)
+ MapObjects(loopVar, fOfLV, inputData, customCollectionCls)
Review comment:
Do you think we can have a unit test case?
----------------------------------------------------------------
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]