viirya commented on a change in pull request #32553:
URL: https://github.com/apache/spark/pull/32553#discussion_r634081309



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -50,7 +50,10 @@ trait InvokeLike extends Expression with NonSQLExpression {
 
   def propagateNull: Boolean
 
-  protected lazy val needNullCheck: Boolean = propagateNull && 
arguments.exists(_.nullable)
+  protected lazy val needNullCheck: Boolean = 
needNullCheckForIndex.contains(true)
+  protected lazy val needNullCheckForIndex: Array[Boolean] =
+    arguments.map(a => a.nullable && (propagateNull ||

Review comment:
       For this change, I think the definition of `propagateNull` is somehow 
different now. Previously if `propagateNull` is true, null will be propagated, 
but now it also depends on if the argument is primitive type. It is better to 
update `propagateNull` param doc.




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