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

   ## Which issue does this PR close?
   
   
   - Follow on to https://github.com/apache/datafusion/pull/13290
   - Closes https://github.com/apache/datafusion/issues/13516
   
   
   ## Rationale for this change
   
   
   Previously, because the functions get the input as `&[ColumnarValues]`,  
they don't own them (the caller retains a reference)
   which requires creating new arrays even when the input array is not used 
anywhere else.
   
   Now that we have changed the signature of `invoke` to get a struct, it is 
possible to potentially avoid allocating a new array for each output.
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   
   1. Change ScalarFunctionArgs to pass by value
   2. Update documentation
   3. Update tests
   3. Update advanced_udf.rs example to show how to reusing values
   
   ## Are there any user-facing changes?
   Yes, both by CI (that it compiles) as well as by the example (which is also 
run in CI)
   
   I could pull out the example into its own specific test case too if people 
thought that was valuable
   
   


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