feat: migrate EmptyExec and PlaceholderRowExec to ExecutionPlan proto hooks#23784
feat: migrate EmptyExec and PlaceholderRowExec to ExecutionPlan proto hooks#23784847850277 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the EmptyExec and PlaceholderRowExec physical leaf plans to the newer protobuf “plan self-serialization” hooks (ExecutionPlan::try_to_proto / X::try_from_proto) while preserving the existing wire format. This continues the ongoing effort to move protobuf encoding/decoding responsibility closer to each plan type and reduce the central downcast/match chains in datafusion-proto.
Changes:
- Implement
ExecutionPlan::try_to_protoforEmptyExecandPlaceholderRowExecindatafusion-physical-plan. - Add plan-specific
try_from_protoconstructors forEmptyExecandPlaceholderRowExec. - Route protobuf decoding through these new hooks and remove the old central encoding downcast arms, keeping deprecated helper methods as compatibility shims.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| datafusion/proto/src/physical_plan/mod.rs | Switch decode match arms to X::try_from_proto, remove central encoding downcast arms for these leaf plans, and keep deprecated helpers as shims delegating to the new hooks. |
| datafusion/physical-plan/src/placeholder_row.rs | Add try_to_proto and PlaceholderRowExec::try_from_proto implementations under feature = "proto". |
| datafusion/physical-plan/src/empty.rs | Add try_to_proto and EmptyExec::try_from_proto implementations under feature = "proto". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #23784 +/- ##
==========================================
- Coverage 80.71% 80.69% -0.02%
==========================================
Files 1089 1089
Lines 368760 368828 +68
Branches 368760 368828 +68
==========================================
- Hits 297647 297631 -16
- Misses 53372 53446 +74
- Partials 17741 17751 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Which issue does this PR close?
Rationale for this change
Migrates the
EmptyExecandPlaceholderRowExecleaf plans while preserving the existing protobuf wire format.What changes are included in this PR?
ExecutionPlan::try_to_protoforEmptyExecandPlaceholderRowExec.try_from_protoimplementations.Are these changes tested?
yes
Are there any user-facing changes?
Hi @andygrove , would you be willing to review this PR when you have time? Thanks!