alamb opened a new pull request, #27929: URL: https://github.com/apache/datafusion/pull/27929
## Which issue does this PR close? - Follow on to https://github.com/apache/datafusion/pull/27644 (see https://github.com/apache/datafusion/pull/27644/changes#r4761375019) ## Rationale for this change The `datafusion-ffi` README currently says the crate defines interfaces "that will remain stable across different versions of DataFusion" and that running the same version on both sides is recommended "but this is not strictly required". That is not how the crate works in practice. The `FFI_*` structs are `#[repr(C)]` structs of function pointers, and their layout changes whenever a callback is added or its signature changes. As I noted in https://github.com/apache/datafusion/pull/27644/changes#r4761375019, the ABI compatibility is designed for libraries built against the same DataFusion version, not different ones, and this applies to FFI in general rather than to any one PR. The only place the real rule is written down today is the rustdoc on `datafusion_ffi::version()`, which says the major version identifies compatibility. There is plenty of precedent for changing the layout of FFI structs between releases: - https://github.com/apache/datafusion/pull/27644 changes the return types of the `FFI_CatalogProvider` and `FFI_SchemaProvider` callbacks - https://github.com/apache/datafusion/pull/27428 added callbacks to `FFI_ExecutionPlan` and `FFI_PhysicalExpr` (its upgrade guide entry says "rebuild FFI providers and consumers against the same release") - https://github.com/apache/datafusion/pull/25876 added a field to `FFI_AggregateUDF` - https://github.com/apache/datafusion/pull/23908 added a field to `FFI_AggregateUDF` - https://github.com/apache/datafusion/pull/23906 changed `FFI_TableProvider` - https://github.com/apache/datafusion/pull/23069 added a callback to `FFI_ScalarUDF` - https://github.com/apache/datafusion/pull/22797 added a callback to `FFI_ScalarUDF` Documenting the rule once means each such PR does not need to re-explain it in the upgrade guide. ## What changes are included in this PR? 1. Add a "Version Compatibility" section to `datafusion/ffi/README.md` saying both sides of the FFI boundary must use the same major version of `datafusion-ffi`, why, and how to check with `datafusion_ffi::version`. 2. Remove the two statements in the introduction that said the interfaces are stable across DataFusion versions. ## What is the testing strategy for this PR? Documentation only, no tests. ## Are there any user-facing changes? Documentation only. No behavior or API 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]
