-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Query Optimization 2021-02-22, Query Optimization 2021-03-08, Query Optimization 2021-03-22, Query Optimization 2021-04-05, Query Optimization 2021-04-19, Query Optimization 2021-05-03
From Syntax:
$count
This is a new accumulator which returns the number of documents in the current window/partition. In $group, it is identical to {newField: {$sum: 1}} but will only be exposed as a window function. It is an error to specify an input expression to $count, but a non-default window may be specified.
{newField: {$count: {}, window: ...}}
From Technical Design Document:
A $count window function will be desugared to a $sum with an input expression of the constant '1'. The window definition will remain the same.
- is depended on by
-
SERVER-54338 Support default expression in $shift window function
- Closed