You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Phoenix500526 (via GitHub)" <gi...@apache.org> on 2026/07/21 07:33:56 UTC
[PR] Migrate ExplainExec and AnalyzeExec protobuf serde [datafusion]
Phoenix500526 opened a new pull request, #23742:
URL: https://github.com/apache/datafusion/pull/23742
## 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 #23511.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
Physical plan protobuf serialization is being moved from the central
dispatch module into each `ExecutionPlan` implementation. Co-locating
this logic with the corresponding execution plan makes the serialization
code easier to maintain and incrementally reduces the central downcast
chain.
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
- Implement plan-local protobuf serialization and deserialization for
`ExplainExec`.
- Implement plan-local protobuf serialization and deserialization for
`AnalyzeExec`.
- Remove both plans from the live central serialization dispatch.
- Retain the deprecated compatibility methods as delegates to the new
implementations.
- Preserve the existing protobuf wire format.
- Strengthen roundtrip tests to cover all stored fields, including every
`StringifiedPlan` variant, metric categories, and explain formats.
Each execution plan migration is kept in a separate commit.
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
Yes. The following checks pass:
- `cargo fmt --all`
- `cargo clippy --all-targets --all-features -- -D warnings`
- Full extended workspace test suite
- `cargo test -p datafusion-proto --test proto_integration`
The proto integration suite passes all 209 tests after rebasing onto the
latest `main`.
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
No. This is an internal refactor and does not change the protobuf wire
format or user-facing behavior.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Migrate ExplainExec and AnalyzeExec protobuf serde [datafusion]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23742:
URL: https://github.com/apache/datafusion/pull/23742#issuecomment-5031456904
<!-- semver-check-comment -->
Thank you for opening this pull request!
Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/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>
<summary>Details</summary>
```
Cloning apache/main
Building datafusion-physical-plan v54.0.0 (current)
Built [ 39.360s] (current)
Parsing datafusion-physical-plan v54.0.0 (current)
Parsed [ 0.143s] (current)
Building datafusion-physical-plan v54.0.0 (baseline)
Built [ 38.158s] (baseline)
Parsing datafusion-physical-plan v54.0.0 (baseline)
Parsed [ 0.146s] (baseline)
Checking datafusion-physical-plan v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 0.659s] 223 checks: 223 pass, 30 skip
Summary no semver update required
Finished [ 80.097s] datafusion-physical-plan
Building datafusion-proto v54.0.0 (current)
Built [ 62.114s] (current)
Parsing datafusion-proto v54.0.0 (current)
Parsed [ 0.020s] (current)
Building datafusion-proto v54.0.0 (baseline)
Built [ 63.496s] (baseline)
Parsing datafusion-proto v54.0.0 (baseline)
Parsed [ 0.020s] (baseline)
Checking datafusion-proto v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 0.242s] 223 checks: 222 pass, 1 fail, 0 warn, 30 skip
--- failure trait_method_marked_deprecated: trait method #[deprecated] added ---
Description:
A trait method is now #[deprecated]. Downstream crates will get a compiler warning when using this method.
ref: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-deprecated-attribute
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/trait_method_marked_deprecated.ron
Failed in:
method try_into_explain_physical_plan in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:719
method try_into_analyze_physical_plan in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:719
method try_from_explain_exec in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:719
method try_from_analyze_exec in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:719
Summary semver requires new minor version: 0 major and 1 minor checks failed
Finished [ 127.359s] datafusion-proto
```
</details>
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Migrate ExplainExec and AnalyzeExec protobuf serde [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #23742:
URL: https://github.com/apache/datafusion/pull/23742#issuecomment-5074951829
Please resolve conflicts 🙏🏻
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Migrate ExplainExec and AnalyzeExec protobuf serde [datafusion]
Posted by "Phoenix500526 (via GitHub)" <gi...@apache.org>.
Phoenix500526 commented on PR #23742:
URL: https://github.com/apache/datafusion/pull/23742#issuecomment-5076219651
> Please resolve conflicts 🙏🏻
Done
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Migrate ExplainExec and AnalyzeExec protobuf serde [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb merged PR #23742:
URL: https://github.com/apache/datafusion/pull/23742
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Migrate ExplainExec and AnalyzeExec protobuf serde [datafusion]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #23742:
URL: https://github.com/apache/datafusion/pull/23742#issuecomment-5031664366
## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/23742?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `74.27184%` with `53 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 80.69%. Comparing base ([`9a50c67`](https://app.codecov.io/gh/apache/datafusion/commit/9a50c67db0c8a1b23d4068419e9fefd0804c1b0d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7388aea`](https://app.codecov.io/gh/apache/datafusion/commit/7388aea7cec8f44b0c0074b2fc91e4c5ed7e2a10?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on main.
| [Files with missing lines](https://app.codecov.io/gh/apache/datafusion/pull/23742?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [datafusion/proto/src/physical\_plan/mod.rs](https://app.codecov.io/gh/apache/datafusion/pull/23742?src=pr&el=tree&filepath=datafusion%2Fproto%2Fsrc%2Fphysical_plan%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9wcm90by9zcmMvcGh5c2ljYWxfcGxhbi9tb2QucnM=) | 6.66% | [28 Missing :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/23742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [datafusion/physical-plan/src/analyze.rs](https://app.codecov.io/gh/apache/datafusion/pull/23742?src=pr&el=tree&filepath=datafusion%2Fphysical-plan%2Fsrc%2Fanalyze.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1wbGFuL3NyYy9hbmFseXplLnJz) | 70.96% | [11 Missing and 7 partials :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/23742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [datafusion/physical-plan/src/explain.rs](https://app.codecov.io/gh/apache/datafusion/pull/23742?src=pr&el=tree&filepath=datafusion%2Fphysical-plan%2Fsrc%2Fexplain.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1wbGFuL3NyYy9leHBsYWluLnJz) | 93.85% | [3 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/23742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #23742 +/- ##
========================================
Coverage 80.69% 80.69%
========================================
Files 1089 1089
Lines 368424 368575 +151
Branches 368424 368575 +151
========================================
+ Hits 297307 297429 +122
- Misses 53406 53425 +19
- Partials 17711 17721 +10
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/23742?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org