init-js commented on issue #15837: URL: https://github.com/apache/datafusion/issues/15837#issuecomment-2828204628
I may be getting lost in the layers, I'm not well versed in datafusion yet, but when building the physical plan, I notice that the schema part of the Projection is ignored. https://github.com/apache/datafusion/blob/1fe856bece733a2ceaba42803e3d3888b437024f/datafusion/core/src/physical_planner.rs#L763 ``` LogicalPlan::Projection(Projection { input, expr, .. }) => self .create_project_physical_exec( session_state, children.one()?, input, expr, )?, ``` The projection's input schema is the one that ultimately gets included in the physical plan, here: https://github.com/apache/datafusion/blob/1fe856bece733a2ceaba42803e3d3888b437024f/datafusion/core/src/physical_planner.rs#L2037 Would it be possible to copy over the metadata from the Projection's schema onto the fields that were selected? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org