cloud-fan commented on a change in pull request #32553:
URL: https://github.com/apache/spark/pull/32553#discussion_r633999421



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -50,7 +50,14 @@ trait InvokeLike extends Expression with NonSQLExpression {
 
   def propagateNull: Boolean
 
-  protected lazy val needNullCheck: Boolean = propagateNull && 
arguments.exists(_.nullable)
+  def propagateNullForPrimitive: Boolean

Review comment:
       This reminds me of the rule `HandleNullInputsForUDF`.
   
   For primitive inputs, I don't think we have a choice and we must propagate 
null (`isPositive(int i)` can't handle null values). Can we detect it 
automatically instead of adding a new boolean flag?




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