Github user gatorsmile commented on the pull request:
https://github.com/apache/spark/pull/10678#issuecomment-172455671
In this update, the fix is ready to review:
- Group-by expressions in `Aggregate`: missing order-by columns are not
allowed to be added into group-by expressions since it will change the query
result.
- UnaryNode support is limited to `Project`, `Window`, `Aggregate`,
`Distinct`, `Filter`, `Limit`, `RedistributeData`, `Repartition`,
`RepartitionByExpression`, `Sample`, `Sort`, `SortPartitions`, `Subquery`,
`With`, and `WithWindowDefinition`.
- BinaryNode support is still limited to `Join`.
The basic idea of algorithms is simple.
1. Traverse the whole tree in a pre-order manner to find all the
resolvable missing order-by attributes.
2. Traverse the whole tree in a post-order manner to add the found
missing order-by attributes to the node if their `inputSet` contains the
attributes.
Let me know if any part is not appropriate. Thank you! @davies @rxin @yhuai
---
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]