refactor: port HashExpr proto hooks#22502
Open
nanookclaw wants to merge 1 commit into
Open
Conversation
Contributor
|
@nanookclaw could you rebase and resolve conflicts please? |
Signed-off-by: Nanook Claw <nanook@agentmail.to>
6defc35 to
768f68d
Compare
Author
|
Rebased and resolved the conflicts. The new head is Validation run after the rebase:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
HashExprto usetry_to_proto/try_from_proto#22432.Rationale for this change
HashExpris 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'sPhysicalExpr::try_to_protooverride and a feature-gated inherentHashExpr::try_from_proto. The existingPhysicalHashExprNodewire shape is preserved, includingexpr_id: None, whiledatafusion-protonow routesExprType::HashExprdecoding through the hook and no longer has a centralHashExprserialization arm.datafusion-physical-plannow exposes aprotofeature 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 -- --checkcargo check -p datafusion-physical-plancargo test -p datafusion-physical-plan --features proto hash_expr_trycargo test -p datafusion-proto --test proto_integration cases::roundtrip_physical_plan::roundtrip_hash_exprcargo check -p datafusion-protocargo clippy -p datafusion-physical-plan --features proto --all-targets -- -D warningscargo clippy -p datafusion-proto --all-targets -- -D warningsAre there any user-facing changes?
No. This preserves the existing protobuf representation.