batmnnn opened a new pull request, #19395:
URL: https://github.com/apache/datafusion/pull/19395

   Fixes apache/datafusion #19162
   
   The SparkAbs UDF was using the default is_nullable=true for all outputs, 
even when inputs were non-nullable. This commit implements 
return_field_from_args to properly propagate nullability from input arguments.
   
   Changes:
   - Add return_field_from_args implementation to SparkAbs
   - Output nullability now matches input nullability
   - Handle edge case where scalar argument is explicitly null
   - Add tests for nullability behavior
   
   ## Which issue does this PR close?
   
   Closes #19162
   
   ## Rationale for this change
   
   
[SparkAbs](cci:2://file:///Users/batman/datafusion/datafusion/spark/src/function/math/abs.rs:41:0-43:1)
 was always returning `nullable=true` even for non-nullable inputs.
   
   ## What changes are included in this PR?
   
   Implement 
[return_field_from_args](cci:1://file:///Users/batman/datafusion/datafusion/expr/src/udf.rs:210:4-215:5)
 to propagate nullability from input arguments.
   
   ## Are these changes tested?
   
   Yes, added 2 tests for nullability behavior.
   
   ## Are there any user-facing changes?
   
   No.


-- 
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: [email protected]

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