fix: delegate the remaining codec methods in ComposedPhysicalExtensionCodec - #24973
Open
sainad2222 wants to merge 2 commits into
Open
fix: delegate the remaining codec methods in ComposedPhysicalExtensionCodec#24973sainad2222 wants to merge 2 commits into
sainad2222 wants to merge 2 commits into
Conversation
ryux1
reviewed
Sep 6, 2026
ryux1
left a comment
Contributor
There was a problem hiding this comment.
The by-name helper handles empty-success delegation carefully. The newly added expression path still inherits a separate composition bug.
ryux1
approved these changes
Sep 6, 2026
ryux1
left a comment
Contributor
There was a problem hiding this comment.
The new buffer reset isolates each codec attempt, and the regression covers a codec that writes before rejecting followed by one that succeeds. This addresses my concern. Thanks!
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?
ComposedPhysicalExtensionCodecimplements only 6 of the 12PhysicalExtensionCodecmethods #24829.Rationale for this change
See #24829.
What changes are included in this PR?
Delegates the six missing methods to the child codecs.
One wrinkle: the four by-name hooks (
udf,udaf,udwf,higher_order_function) default toOk(())meaning "no payload, encode byname", and decode only consults the registry when no payload is present. Naive
delegation wraps an empty blob and strands those functions, invisible at
position 0, where the tuple prost-encodes to zero bytes. Those four now use a
new
encode_protobuf_by_name_aware, which emits a payload only when a codecactually wrote bytes.
try_encode_exprkeeps the plain path; its default is anerror rather than
Ok(()).What is the testing strategy for this PR?
Four tests in
physical_plan::tests::function_serde; two of them fail againstnaive delegation.
Are there any user-facing changes?
try_encode_udf/try_encode_udafwere already delegated but carried the sameempty-payload bug, so they move to the new helper too. Happy to split that out.
No public API signatures changed.