blaginin opened a new pull request, #14781: URL: https://github.com/apache/datafusion/pull/14781
## Which issue does this PR close? Follow up on https://github.com/apache/datafusion/pull/14684#discussion_r1957428384 ## Rationale for this change Currently, alias over alias creates an extra expression layer, which gets merged in `optimize_projections` through an expensive recursive function ## What changes are included in this PR? A small change to reuse an existing alias when possible. This affects two cases: - Removes unnecessary info when displaying logical plans - Simplifies expressions when `optimize_projections` isn't called (e.g., when there's only one projection and `merge_consecutive_projections` isn't run) ## Are these changes tested? Extended doctest ## Are there any user-facing changes? No. -- 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