Description
select * from (select * from foo order by c asc) bar order by c desc;
in hive sorts the data set twice. The optimizer should probably remove any order by/sort by in the sub query unless you use 'limit '. Could even go so far as barring it at the semantic level.
Attachments
Attachments
Issue Links
- relates to
-
CALCITE-2798 Optimizer should remove ORDER BY in sub-query, provided it has no LIMIT or OFFSET
- Closed
- links to