jkosh44 commented on code in PR #14289:
URL: https://github.com/apache/datafusion/pull/14289#discussion_r1937340392


##########
datafusion/physical-expr/src/scalar_function.rs:
##########
@@ -186,6 +187,15 @@ impl PhysicalExpr for ScalarFunctionExpr {
             .map(|e| e.evaluate(batch))
             .collect::<Result<Vec<_>>>()?;
 
+        if self.fun.signature().null_handling == NullHandling::Propagate
+            && args.iter().any(
+                |arg| matches!(arg, ColumnarValue::Scalar(scalar) if 
scalar.is_null()),

Review Comment:
   > It is just convenient method nice to have but not the must have solution 
for null handling since they can be handled in 'invoke' as well.
   
   If someone forgets to handle nulls in `invoke`, then don't we run the risk 
of accidentally returning different results depending on if the function was 
called with scalar arguments or with a batch of arguments?



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

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to