Skip to content

refactor(proto): destructure lambda expression serde hooks - #24775

Open
buraksenn wants to merge 1 commit into
apache:mainfrom
buraksenn:24617-destructure-proto-lambda
Open

refactor(proto): destructure lambda expression serde hooks#24775
buraksenn wants to merge 1 commit into
apache:mainfrom
buraksenn:24617-destructure-proto-lambda

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 LambdaExpr and LambdaVariable in their encoders.
  • Exhaustively destructure their protobuf nodes in the decoders.
  • Document constructor-derived state and add focused proto hook tests.

The behavior and wire format are unchanged.

Are these changes tested?

Covered by the added lambda proto hook tests:

cargo test -p datafusion-physical-expr --features proto lambda::proto_tests
cargo test -p datafusion-physical-expr --features proto lambda_variable::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 29, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.24561% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.53%. Comparing base (61bf6b9) to head (eea7b16).

Files with missing lines Patch % Lines
...n/physical-expr/src/expressions/lambda_variable.rs 97.14% 1 Missing and 1 partial ⚠️
datafusion/physical-expr/src/expressions/lambda.rs 99.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #24775    +/-   ##
========================================
  Coverage   81.52%   81.53%            
========================================
  Files        1123     1123            
  Lines      405970   406133   +163     
  Branches   405970   406133   +163     
========================================
+ Hits       330978   331139   +161     
- Misses      55627    55630     +3     
+ Partials    19365    19364     -1     

☔ 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 lambda physical expressions

2 participants