timsaucer opened a new pull request, #14775: URL: https://github.com/apache/datafusion/pull/14775
## Which issue does this PR close? This PR addresses part of #14562 ## Rationale for this change This change allows for using user defined **aggregate** functions across FFI boundaries. It is useful for enabling shared libraries to pass functions back and forth. This feature will unlock: - Modules to provide DataFusion based FFI aggregates that can be reused in projects such as `datafusion-python` - Allows for use across different DataFusion versions between the function provider and consumer - Is a major step towards getting to the ability to export a function registry via FFI, a large blocker on sharing a session context ## What changes are included in this PR? This PR follows the same pattern as the previous FFI code. It exposes AggregateUDF and the Accumulators and AccumulatorArgs that go along with it. ## Are these changes tested? Included in this PR are both unit tests and two integration tests. The integration tests cover both grouping and non-grouping UDAFs. For the unit tests here is a tarpaulin report showing the coverage. The 12% not covered is almost entirely error handling. <img width="599" alt="ffi_coverage" src="https://github.com/user-attachments/assets/d34fbaaa-59e3-4a08-9eb0-4c63963354b4" /> <img width="599" alt="ffi_udaf_coverage" src="https://github.com/user-attachments/assets/100ebad2-aa96-40d3-8d8d-d2f2c0a4ec79" /> ## Are there any user-facing changes? There are no changes to existing API but new functions are exposed in the `datafusion-ffi` crate. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org