You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/02 21:38:36 UTC

[GitHub] [spark] erikerlandson commented on a change in pull request #28983: [SPARK-32159][SQL] Fix integration between Aggregator[Array[_], _, _] and UnresolvedMapObjects

erikerlandson commented on a change in pull request #28983:
URL: https://github.com/apache/spark/pull/28983#discussion_r449277693



##########
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:
       Yes, I can construct a unit test




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org