Yuvraj-cyborg opened a new pull request, #19531:
URL: https://github.com/apache/datafusion/pull/19531

   Closes #19169 
   
   ## Rationale for this change:
   
   The current implementation of `SparkAscii` UDF uses the default 
`is_nullable` which always returns true. This is incorrect because the output 
should only be nullable if the input argument is nullable. This change 
implements proper null propagation behavior by using `return_field_from_args` .
   
   ## Changes in PR:
   
   - Implemented return_field_from_args for SparkAscii to properly compute 
output nullability based on input argument nullability
   - Changed `return_type` to `return internal_err!` since 
`return_field_from_args` is now used (following the pattern used by other Spark 
functions like ilike, concat, elt)
   - Added unit tests verifying the nullability behavior:
      - Output is nullable when input is nullable
      - Output is non-nullable when input is non-nullable
   
   ## Test Coverage:
   
   Yes, tests are included to verify the change.
   
   ## User-facing Changes:
   
   No user-facing changes. 


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