Skip to content

refactor(proto): destructure CASE and IN-list expression serde hooks - #24700

Open
buraksenn wants to merge 1 commit into
apache:mainfrom
buraksenn:24616-case-in-list-proto-destructure
Open

refactor(proto): destructure CASE and IN-list expression serde hooks#24700
buraksenn wants to merge 1 commit into
apache:mainfrom
buraksenn:24616-case-in-list-proto-destructure

Conversation

@buraksenn

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Proto hooks that access fields individually can silently omit newly added state. Exhaustive destructuring makes such omissions compile errors.

What changes are included in this PR?

  • Exhaustively destructure CaseExpr, CaseBody, and InListExpr in their encoders.
  • Exhaustively destructure their protobuf nodes in the decoders.
  • Document eval_method and static_filter as constructor-derived state.

The behavior and wire format are unchanged.

Are these changes tested?

Covered by the existing CASE and IN-list proto hook tests:

cargo test -p datafusion-physical-expr --features proto case::proto_tests
cargo test -p datafusion-physical-expr --features proto in_list::proto_tests

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the physical-expr Changes to the physical-expr crates label Aug 26, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.45%. Comparing base (872df4d) to head (34252d8).

Files with missing lines Patch % Lines
datafusion/physical-expr/src/expressions/case.rs 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24700      +/-   ##
==========================================
- Coverage   81.45%   81.45%   -0.01%     
==========================================
  Files        1119     1119              
  Lines      400411   400428      +17     
  Branches   400411   400428      +17     
==========================================
+ Hits       326144   326149       +5     
- Misses      55195    55202       +7     
- Partials    19072    19077       +5     

☔ 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

physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Destructure proto hooks for CASE and IN-list physical expressions

2 participants