buraksenn opened a new pull request, #24207: URL: https://github.com/apache/datafusion/pull/24207
## Which issue does this PR close? - Closes #24202. ## Rationale for this change Physical-plan deserialization rebuilt `AggregateExec` output schemas from decoded aggregate expression names. `OptimizeAggregateOrder` can reverse aggregate expressions while preserving the original schema, causing protobuf round trips to change output field names and lose the expression's reversed state. ## What changes are included in this PR? - Serialize and restore the preserved `AggregateExec` output schema. - Serialize and restore `AggregateFunctionExpr::is_reversed`. - Fall back to schema reconstruction for older payloads without an output schema. - Regenerate the prost and pbjson models. - Add a byte-level regression test covering optimizer reversal and backward compatibility. ## Are these changes tested? Yes: - `cargo test -p datafusion-proto --test proto_integration roundtrip_aggregate_preserves_optimizer_schema_and_reversed_state` - `cargo fmt --all` - `cargo clippy --all-targets --all-features -- -D warnings` - `./dev/rust_lint.sh` ## Are there any user-facing changes? Physical-plan protobuf round trips now preserve aggregate output field names and reversed state. The protobuf wire format remains backward compatible; generated Rust model structs gain new fields. -- 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]
