Skip to content

add proto converter reference to PhysicalExtensionCodec#21055

Draft
jayshrivastava wants to merge 1 commit intoapache:mainfrom
jayshrivastava:js/add-proto-converter-to-physical-extension-codec-trait
Draft

add proto converter reference to PhysicalExtensionCodec#21055
jayshrivastava wants to merge 1 commit intoapache:mainfrom
jayshrivastava:js/add-proto-converter-to-physical-extension-codec-trait

Conversation

@jayshrivastava
Copy link

@jayshrivastava jayshrivastava commented Mar 19, 2026

Which issue does this PR close?

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.

…mic filter deduping to work in custom plan nodes
@github-actions github-actions bot added proto Related to proto crate ffi Changes to the ffi crate labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ffi Changes to the ffi crate proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add PhysicalProtoConverterExtension to PhysicalExtensionCodec

1 participant