alamb commented on PR #10234: URL: https://github.com/apache/datafusion/pull/10234#issuecomment-2088298702
> I think that we should handle `ORDER BY` similarly to `HAVING`, use the merged schema, add the missing columns directly in the select list, instead of traversing the plan looking for projection node. Their processing logic may be reusable. I agree it might be good to have a broader discussion about this. Yes, this makes sense -- so in this case perhaps it would mean removing [add_missing_columns](https://github.com/apache/datafusion/blob/f8c623fe045d70a87eac8dc8620b74ff73be56d5/datafusion/expr/src/logical_plan/builder.rs#L437) and unifying with this code path. I'll file a ticket to discuss -- 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