Github user hvanhovell commented on the issue:
https://github.com/apache/spark/pull/16246
I think we need to revisit the rule in CheckAnalysis, and make it `Alias`
aware. We only need to keep track of the inner references. We traverse/recurse
down the tree and do a few things:
- When we encounter any other than a
`Project`/`Filter`/`SubqueryAlias`/`Aggregate`, we should fail.
- When we encounter a Project. Assume that there are only Alias or
AttributeReference expressions (this should be the case anyway), and update the
references for columns that are aliased.
- When we encounter a `Filter`/`SubqueryAlias`, do Nothing.
- When we encounter a toplevel Aggregate, validate the grouping expressions
using the updated references (the current logic should be fine here), and
return.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]