Currently we only use DISTINCT_SCAN in a $group for last and first accumulators following a sort. Expand to also use DISTINCT_SCAN for top and bottom accumulators.
- is related to
-
SERVER-90017 Parse firstN/lastN/minN/maxN/topN/bottomN with n = 1 into a corresponding first/last/min/max/top/bottom
-
- Closed
-
- related to
-
SERVER-107953 DISTINCT_SCAN with $top and $bottom is only used when grouping field is included as sort prefix
-
- Needs Scheduling
-
-
SERVER-85213 Rewrite $sort+$group with $first/$last to use $top/$bottom
-
- Backlog
-