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



##########
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:
       But, this part `(e.g. mistakenly reference an encoder instance when 
implementing Aggregator)`  will be fixed by this PR, right?




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