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

   ## Which issue does this PR close?
   
   Closes https://github.com/apache/datafusion/issues/22662.
   
   ## Rationale for this change
   
   Async scalar UDFs can compute output field metadata in 
`return_field_from_args(...)`, but `AsyncFuncExpr` rebuilt the output field 
from only name, data type, and nullability. This dropped metadata from async 
UDF result fields.
   
   ## What changes are included in this PR?
   
   This PR updates `AsyncFuncExpr::field(...)` to preserve the planned 
`return_field` metadata and only rename the field for the async expression 
output.
   
   It also adds a regression test that verifies an async UDF result batch 
preserves metadata attached by `return_field_from_args(...)`.
   
   ## Are these changes tested?
   
   Yes.
   
   Added a regression test in:
   - `datafusion/core/tests/user_defined/user_defined_async_scalar_functions.rs`
   
   The test fails without the fix and passes with the fix.
   
   ## Are there any user-facing changes?
   
   Yes.
   
   Async scalar UDF result fields now preserve metadata attached by 
`return_field_from_args(...)`.
   


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