goutamadwant opened a new pull request, #25009:
URL: https://github.com/apache/datafusion/pull/25009

   ## Which issue does this PR close?
   
   - Closes #24695.
   
   ## Rationale for this change
   
   Physical-plan serialization loses projection field and schema metadata when 
it differs from metadata derived from the input and expressions.
   
   ## What changes are included in this PR?
   
   - Add an optional schema to `ProjectionExecNode`, emitted only when the 
projection overrides metadata.
   - Restore metadata through `try_new_with_schema_metadata`, keeping field 
names, types, and nullability derived from the expressions.
   - Preserve decoding of older payloads without the optional field.
   
   ## What is the testing strategy for this PR?
   
   - `roundtrip_projection_metadata` reproduces the loss before the fix and 
passes afterward.
   - Added binary and JSON coverage for overrides, explicit clearing, extension 
metadata, and older payloads. `decode_projection_schema_only_replaces_metadata` 
checks expression-derived field properties and invalid field counts.
   - The required extended workspace test command passes, including 2,014 
physical-plan tests, 268 protobuf integration tests, and 511 SQL logic-test 
files.
   - All-target, all-feature Clippy passes for the three affected crates; the 
contributor guide's documented lint steps also pass.
   - Full-workspace Clippy with all features enabled hits the existing 
PostgreSQL decimal-formatting lint in #24974; the affected source is unchanged 
here.
   
   ## Are there any user-facing changes?
   
   Projection metadata survives physical-plan serialization. The generated 
`ProjectionExecNode` Rust struct gains an optional `schema` field. New readers 
continue to accept older payloads. This targets main, not a 55.1 backport.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to