You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 81cdb1a
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: port HashExpr proto hooks (apache#22502)
## Which issue does this PR close?
- Closesapache#22432.
## Rationale for this change
`HashExpr` is part of the physical expression proto cleanup tracked by
apache#22418. Its protobuf serialization should live with the expression
implementation instead of in the central proto downcast chains, matching
the hook pattern added in apache#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.
---------
Signed-off-by: Nanook Claw <[email protected]>
Signed-off-by: Nanook <[email protected]>
Co-authored-by: Nanook <[email protected]>
Co-authored-by: Adrian Garcia Badaracco <[email protected]>
0 commit comments