Github user henryr commented on the issue:
https://github.com/apache/spark/pull/21049
@dilipbiswal Thanks! Although Spark doesn't necessarily parse the query in
the `from` clause as a subquery, is it fair to say it plans it as one? (Since
the planner puts the alias under a `SubqueryAlias` node). The optimization of
removing the sorts seems valid to me in any case, since neither an alias nor a
subquery should be sorting except in the presence of a `limit`. Or do you think
that this optimization should only be applied to subqueries that aren't in the
`from` clause?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]