Skip to content

refactor(proto): migrate UnnestExec serde - #23739

Merged
adriangb merged 1 commit into
apache:mainfrom
Phoenix500526:issue/23510
Jul 23, 2026
Merged

refactor(proto): migrate UnnestExec serde#23739
adriangb merged 1 commit into
apache:mainfrom
Phoenix500526:issue/23510

Conversation

@Phoenix500526

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The central protobuf dispatcher must know every built-in execution plan, which separates UnnestExec serialization from the type that owns it.

Move encoding and decoding to plan-local hooks while retaining the deprecated helpers as compatibility wrappers. Extend roundtrip coverage to include non-default unnest options.

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

The central protobuf dispatcher must know every built-in execution plan,
which separates UnnestExec serialization from the type that owns it.

Move encoding and decoding to plan-local hooks while retaining the
deprecated helpers as compatibility wrappers. Extend roundtrip coverage
to include non-default unnest options.

CLOSES apache#23510

Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
@github-actions github-actions Bot added proto Related to proto crate physical-plan Changes to the physical-plan crate labels Jul 21, 2026
@github-actions

Copy link
Copy Markdown

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
     Cloning apache/main
    Building datafusion-physical-plan v54.0.0 (current)
       Built [  30.685s] (current)
     Parsing datafusion-physical-plan v54.0.0 (current)
      Parsed [   0.117s] (current)
    Building datafusion-physical-plan v54.0.0 (baseline)
       Built [  29.118s] (baseline)
     Parsing datafusion-physical-plan v54.0.0 (baseline)
      Parsed [   0.117s] (baseline)
    Checking datafusion-physical-plan v54.0.0 -> v54.0.0 (no change; assume patch)
     Checked [   0.766s] 223 checks: 223 pass, 30 skip
     Summary no semver update required
    Finished [  62.989s] datafusion-physical-plan
    Building datafusion-proto v54.0.0 (current)
       Built [  47.877s] (current)
     Parsing datafusion-proto v54.0.0 (current)
      Parsed [   0.016s] (current)
    Building datafusion-proto v54.0.0 (baseline)
       Built [  48.430s] (baseline)
     Parsing datafusion-proto v54.0.0 (baseline)
      Parsed [   0.017s] (baseline)
    Checking datafusion-proto v54.0.0 -> v54.0.0 (no change; assume patch)
     Checked [   0.278s] 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_unnest_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_unnest_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 [  98.057s] datafusion-proto

@github-actions github-actions Bot added the auto detected api change Auto detected API change label Jul 21, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.06422% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.68%. Comparing base (9a50c67) to head (04a2a38).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/proto/src/physical_plan/mod.rs 6.66% 14 Missing ⚠️
datafusion/physical-plan/src/unnest.rs 88.29% 5 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23739      +/-   ##
==========================================
- Coverage   80.69%   80.68%   -0.02%     
==========================================
  Files        1089     1089              
  Lines      368424   368486      +62     
  Branches   368424   368486      +62     
==========================================
+ Hits       297307   297317      +10     
- Misses      53406    53451      +45     
- Partials    17711    17718       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adriangb
adriangb added this pull request to the merge queue Jul 23, 2026
.recursions
.iter()
.map(|recursion| datafusion_common::RecursionUnnestOption {
input_column: recursion.input_column.as_ref().unwrap().into(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just flagging there's an inline panic here (input_column/output_column .as_ref().unwrap()) — not introduced by this PR (it's carried over verbatim from the old UnnestOptions::from_proto), but something worth fixing if you want to open a followup after we merge this.

Merged via the queue into apache:main with commit fc4acd8 Jul 23, 2026
40 checks passed
@Phoenix500526
Phoenix500526 deleted the issue/23510 branch July 25, 2026 06:40
kosiew pushed a commit to kosiew/datafusion that referenced this pull request Aug 12, 2026
## 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 apache#123` indicates that this PR will close issue apache#123.
-->

- Closes apache#23510.

## 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.
-->
The central protobuf dispatcher must know every built-in execution plan,
which separates UnnestExec serialization from the type that owns it.

Move encoding and decoding to plan-local hooks while retaining the
deprecated helpers as compatibility wrappers. Extend roundtrip coverage
to include non-default unnest options.



## 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.
-->

## Are these changes tested?

Yes
<!--
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)?
-->

## 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.
-->

Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto detected api change Auto detected API change physical-plan Changes to the physical-plan crate proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proto: migrate UnnestExec

3 participants