refactor: port InListExpr to use try_to_proto/try_from_proto hooks#22503
Open
kkrainov wants to merge 1 commit into
Open
refactor: port InListExpr to use try_to_proto/try_from_proto hooks#22503kkrainov wants to merge 1 commit into
kkrainov wants to merge 1 commit into
Conversation
- Implement PhysicalExpr::try_to_proto for InListExpr - Implement InListExpr::try_from_proto inherent method - Wire hooks in from_proto.rs and remove legacy logic in to_proto.rs - Add comprehensive unit tests with mocks to verify hooks in isolation - Pass all unit and integration tests with clean clippy
275a2c4 to
ba148c1
Compare
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?
InListExprto usetry_to_proto/try_from_proto#22425Rationale for this change
This PR migrates InListExpr to use the new try_to_proto and try_from_proto hooks, following the modular serialization architecture established in #21835 . This moves serialization logic into the expression itself, improving encapsulation and decentralizing the datafusion-proto logic as part of the broader effort in #22418
What changes are included in this PR?
PhysicalExpr::try_to_proto for InListExpr.InListExpr::try_from_protoinherent method.from_proto.rsand removed the central downcast arm in to_proto.rs.in_list.rsusing mock drivers to verify roundtrips and error handling.Are these changes tested?
Yes, these changes are covered by both new and existing tests:
proto_teststo in_list.rs using mock drivers to verifytry_to_protoandtry_from_protoin isolation. These cover successful roundtrips, incorrect node types, and missing required fields.clippy --all-targets --all-featureswith zero warnings.Are there any user-facing changes?
No.