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 50d74a7
Browse filesBrowse the repository at this point in the historyBrowse files
proto: add proto converter reference to PhysicalExtensionCodec trait (#21055)
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes#123` indicates that this PR will close issue #123.
-->
- Closes#21056
## Rationale for this change
Custom `ExecutionPlan` nodes that store `PhysicalExpr` fields cannot
participate in expression deduplication during serialization because
`PhysicalExtensionCodec::try_encode`/`try_decode` lack access to the
`PhysicalProtoConverterExtension`.
## What changes are included in this PR?
- Added `proto_converter: &dyn PhysicalProtoConverterExtension`
parameter
to `PhysicalExtensionCodec::try_decode` and `try_encode`
- Updated all implementations: `DefaultPhysicalExtensionCodec`,
`ComposedPhysicalExtensionCodec`, `ForeignPhysicalExtensionCodec` (FFI),
and all examples
- Updated call sites in `PhysicalPlanNode` serialization/deserialization
- FFI bridge passes `DefaultPhysicalProtoConverter` as a fallback
## Are these changes tested?
Yes — added `test_custom_node_with_dynamic_filter_dedup_roundtrip` which
verifies that a `DynamicFilterPhysicalExpr` shared between a
`FilterExec`
and a custom `ExecutionPlan` node preserves its shared inner state after
a
roundtrip through `DeduplicatingProtoConverter`.
## Are there any user-facing changes?
Breaking API change: `PhysicalExtensionCodec::try_decode` and
`try_encode`
now take an additional `&dyn PhysicalProtoConverterExtension` parameter.
All custom codec implementations must be updated.
0 commit comments