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



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -678,6 +678,9 @@ object MapObjects {
       elementType: DataType,
       elementNullable: Boolean = true,
       customCollectionCls: Option[Class[_]] = None): MapObjects = {
+    if (function == null) {
+      throw new UnsupportedOperationException("Cannot instantiate MapObjects 
with null function")
+    }

Review comment:
       btw, could we remove the workaround now? 
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala#L653
   Or, we need to update the comment if the same issue can happen in the other 
places.




----------------------------------------------------------------
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]

Reply via email to