Skip to content

refactor(proto): migrate window serde#23780

Open
Phoenix500526 wants to merge 1 commit into
apache:mainfrom
Phoenix500526:issue/23513
Open

refactor(proto): migrate window serde#23780
Phoenix500526 wants to merge 1 commit into
apache:mainfrom
Phoenix500526:issue/23513

Conversation

@Phoenix500526

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Window plans still relied on centralized protobuf dispatch, keeping serialization separate from the execution plans that own their state. Both window executors share one protobuf variant. Decoding must inspect input_order_mode before selecting the concrete plan.

Add plan-local encoders for both executors and a decoder for the shared node. Keep the legacy helpers as deprecated delegates while preserving window frames and UDF payloads on the existing wire format.

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

Window plans still relied on centralized protobuf dispatch, keeping
serialization separate from the execution plans that own their state.
Both window executors share one protobuf variant. Decoding must inspect
`input_order_mode` before selecting the concrete plan.

Add plan-local encoders for both executors and a decoder for the
shared node. Keep the legacy helpers as deprecated delegates while
preserving window frames and UDF payloads on the existing wire format.

CLOSES apache#23513
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.1.0 (current)
       Built [  36.481s] (current)
     Parsing datafusion-physical-plan v54.1.0 (current)
      Parsed [   0.148s] (current)
    Building datafusion-physical-plan v54.1.0 (baseline)
       Built [  35.659s] (baseline)
     Parsing datafusion-physical-plan v54.1.0 (baseline)
      Parsed [   0.148s] (baseline)
    Checking datafusion-physical-plan v54.1.0 -> v54.1.0 (no change; assume patch)
     Checked [   0.904s] 223 checks: 223 pass, 30 skip
     Summary no semver update required
    Finished [  75.062s] datafusion-physical-plan
    Building datafusion-proto v54.1.0 (current)
       Built [  58.934s] (current)
     Parsing datafusion-proto v54.1.0 (current)
      Parsed [   0.020s] (current)
    Building datafusion-proto v54.1.0 (baseline)
       Built [  59.878s] (baseline)
     Parsing datafusion-proto v54.1.0 (baseline)
      Parsed [   0.020s] (baseline)
    Checking datafusion-proto v54.1.0 -> v54.1.0 (no change; assume patch)
     Checked [   0.347s] 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.49.0/src/lints/trait_method_marked_deprecated.ron

Failed in:
  method try_into_window_physical_plan in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:721
  method try_from_window_agg_exec in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:721
  method try_from_bounded_window_agg_exec in trait datafusion_proto::physical_plan::PhysicalPlanNodeExt in /home/runner/work/datafusion/datafusion/datafusion/proto/src/physical_plan/mod.rs:721

     Summary semver requires new minor version: 0 major and 1 minor checks failed
    Finished [ 120.383s] 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 73.22581% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.66%. Comparing base (9a50c67) to head (b398e8c).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...usion/physical-plan/src/windows/window_agg_exec.rs 77.73% 23 Missing and 34 partials ⚠️
datafusion/proto/src/physical_plan/mod.rs 4.76% 20 Missing ⚠️
...ysical-plan/src/windows/bounded_window_agg_exec.rs 81.81% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23780      +/-   ##
==========================================
- Coverage   80.69%   80.66%   -0.03%     
==========================================
  Files        1089     1089              
  Lines      368424   368970     +546     
  Branches   368424   368970     +546     
==========================================
+ Hits       297307   297639     +332     
- Misses      53406    53572     +166     
- Partials    17711    17759      +48     

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

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 WindowAggExec + BoundedWindowAggExec

2 participants