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

   ## Which issue does this PR close?
   
     - Closes #23529.
   
     ## Rationale for this change
   
     Logical projection aliases can attach field metadata, but physical 
projection planning derived its output schema only from the unwrapped physical 
expressions. This caused schema validation to reject
     aggregates above such projections.
   
     ## What changes are included in this PR?
   
     - Apply logical projection schema and field metadata when constructing 
`ProjectionExec`.
     - Preserve the existing physical derivation of field names, types, and 
nullability.
     - Add metadata-aware constructors across the physical-expression and 
physical-plan crate boundary.
     - Cover projections with alias metadata followed by aggregation.
   
     ## Are these changes tested?
   
     Yes. A focused physical planner regression test reproduces the original 
schema mismatch and passes with the fix. The relevant core and physical-plan 
unit suites, targeted all-targets/all-features
     clippy, formatting, and diff checks also pass.
   
     ## Are there any user-facing changes?
   
     Projection field metadata is now preserved in physical plans. Two additive 
constructor methods support passing projection schema metadata across crate 
boundaries; no existing API is changed.


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