adriangb opened a new pull request, #23731:
URL: https://github.com/apache/datafusion/pull/23731

   ## Which issue does this PR close?
   
   - Part of #23494.
   
   ## Rationale for this change
   
   #23495 landed the deprecated `ProjectionExec` compatibility shims
   (`try_from_projection_exec` / `try_into_projection_physical_plan`) with their
   original bodies fully duplicated in `datafusion-proto`, even though the same
   wire-format logic now lives in `ProjectionExec::try_to_proto` / 
`try_from_proto`
   (the #22419 hook pattern). This PR makes those deprecated shims **delegate** 
to
   the new hooks so the wire format is single-sourced in 
`datafusion-physical-plan`
   rather than duplicated. This matches the `FilterExec` delegate style in 
#23708.
   No wire-format change.
   
   ## What changes are included in this PR?
   
   - Replace the body of `try_from_projection_exec` with a thin shim that 
builds an
     `ExecutionPlanEncodeCtx` from the `codec` + `proto_converter` (via
     `ConverterPlanEncoder`) and delegates to `ProjectionExec::try_to_proto`.
   - Replace the body of `try_into_projection_physical_plan` with a thin shim 
that
     builds an `ExecutionPlanDecodeCtx` (via `ConverterPlanDecoder`) and 
delegates
     to `ProjectionExec::try_from_proto`; the now-unused `projection` param is
     renamed to `_projection`.
   - Drop the now-unused `ProjectionExpr` import.
   
   The `#[deprecated(...)]` attributes and signatures are otherwise unchanged, 
and
   the live dispatch arms and the `ProjectionExec` hook impls are untouched.
   
   ## Are these changes tested?
   
   Yes — the existing `roundtrip_physical_plan` projection/filter roundtrip 
tests
   exercise this path and pass (`roundtrip_projection_source`,
   `roundtrip_filter_with_fetch`, `roundtrip_filter_with_not_and_in_list`, and 
the
   full 203-test `roundtrip` suite). `cargo clippy -p datafusion-proto
   --all-features -- -D warnings` is clean.
   
   ## Are there any user-facing changes?
   
   No. The methods remain `#[deprecated]` with identical signatures and wire
   format; only their internals change.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01U9qX6kekbJGpmTSxvrU8e5
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to