nanookclaw opened a new pull request, #22502: URL: https://github.com/apache/datafusion/pull/22502
## Which issue does this PR close? - Closes #22432. ## Rationale for this change `HashExpr` is part of the physical expression proto cleanup tracked by #22418. Its protobuf serialization should live with the expression implementation instead of in the central proto downcast chains, matching the hook pattern added in #21929. ## What changes are included in this PR? This adds `HashExpr`'s `PhysicalExpr::try_to_proto` override and a feature-gated inherent `HashExpr::try_from_proto`. The existing `PhysicalHashExprNode` wire shape is preserved, including `expr_id: None`, while `datafusion-proto` now routes `ExprType::HashExpr` decoding through the hook and no longer has a central `HashExpr` serialization arm. `datafusion-physical-plan` now exposes a `proto` feature so the hook code only compiles when proto support is requested. ## Are these changes tested? Yes. Added focused direct hook tests for encoding, decoding, and rejecting a wrong `expr_type`. Commands run: - `cargo fmt --all -- --check` - `cargo check -p datafusion-physical-plan` - `cargo test -p datafusion-physical-plan --features proto hash_expr_try` - `cargo test -p datafusion-proto --test proto_integration cases::roundtrip_physical_plan::roundtrip_hash_expr` - `cargo check -p datafusion-proto` - `cargo clippy -p datafusion-physical-plan --features proto --all-targets -- -D warnings` - `cargo clippy -p datafusion-proto --all-targets -- -D warnings` ## Are there any user-facing changes? No. This preserves the existing protobuf representation. -- 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]
