andygrove commented on issue #1468: URL: https://github.com/apache/arrow-datafusion/issues/1468#issuecomment-1118588734
I spent some time on this and I am no longer sure that this change makes sense. We have a lot of optimizer rules that recurse through expression trees rewriting them and if we move the `Alias` variant out of the `Expr` enum it complicates things because we still need to recurse into the expression contained within the alias. It doesn't feel like the effort here justifies the benefit, IMO. There are other `Expr` variants that only make sense in certain contexts as well. We can't have an `Expr::Sort` in a projection, for example. Maybe we just need some validation rules to ensure plans make sense and better utility methods for dealing with alias in cases where it is not valid? -- 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]
