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

   ## Which issue does this PR close?
   Closes **#20031**
   
   ---
   
   ## Why this change was needed
   Async scalar functions were being treated the same as synchronous functions 
during execution. As a result, a coalescing optimization—intended only for 
synchronous functions—was incorrectly applied to async functions. This led to 
unexpected behavior and internal errors when async scalar functions were 
executed.
   
   This change ensures that async functions are handled correctly and are no 
longer subject to optimizations that do not apply to them.
   
   ---
   
   ## What changes are included in this PR?
   - Updated `async_func.rs` to skip input coalescing when the underlying 
scalar function is asynchronous
   - Added a new unit test, `test_async_fn_with_coalescing`, to verify that 
async functions behave correctly in the presence of coalescing logic
   
   ---
   
   ## Are these changes tested?
   Yes. A new unit test, `test_async_fn_with_coalescing`, was added in 
`datafusion/physical-plan/src/async_func.rs` to validate the fix and prevent 
regressions.
   
   ---
   
   ## Are there any user-facing changes?
   No. This is an internal bug fix that corrects execution behavior for async 
scalar functions without introducing any user-facing API or behavioral 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