Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Integration
Description
Pipeline
[{$group: {_id: "$m", l: {$bottom: {sortBy: {t: 1}, output: "$x"}}}}]
|
over timeseries with "m" being the metaField and "t" being the timeField triggers lastpoint optimization as expected, however, the same pipeline prefixed with exclusion projection:
[{$project: {y: 0}}, {$group: {_id: "$m", l: {$bottom: {sortBy: {t: 1}, output: "$x"}}}}]
|
does not. But it would be valid to apply the optimization in this case as well (or remove the useless projection altogether).