xudong963 opened a new pull request, #27541: URL: https://github.com/apache/datafusion/pull/27541
## Which issue does this PR close? Backports #27428 (fix for #27427) to `branch-56` for the 56.0.0 release tracked in #24461. ## Rationale for this change The datafusion-python upgrade exposed a planning regression in 56.0.0 RC1. When the query planner and optimizer run on opposite sides of the FFI boundary, the optimizer can miss an aggregate's hash partitioning requirement and produce a plan that fails `SanityCheckPlan`. This blocks apache/datafusion-python#1826. ## What changes are included in this PR? Clean cherry-pick of 701e5562c990c58a0dcd02fd0a02bc3d601b7b84. Foreign execution plans expose their input requirements, and physical expressions originating in the same library can be compared for equality. The 56.0.0 upgrade guide describes both ABI changes. ## What is the testing strategy for this PR? Verified on the backport branch: - `cargo clippy --all-targets --all-features -- -D warnings` - `cargo test -p datafusion-ffi -p datafusion-ffi-integration-tests --features integration-tests`, including the `EnsureRequirements` regression and the cross-library plan-requirements and expression-equality tests - `cargo fmt --all` and the repository's Markdown formatting check Local `cargo audit` reports RUSTSEC-2026-0523, RUSTSEC-2026-0524 and RUSTSEC-2026-0538 for the existing `quinn-proto` and `quinn-udp` versions. The unmodified RC1 lockfile reproduces all three findings. This backport preserves the dependency versions. ## Are there any user-facing changes? Yes. Foreign plans preserve their input requirements. The layouts of `FFI_ExecutionPlan` and `FFI_PhysicalExpr` change. FFI providers and consumers built against RC1 must be rebuilt together for RC2. Including the fix before 56.0.0 is final keeps one ABI for the published 56.x series. -- 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]
