-
Type:
Sub-task
-
Resolution: Done
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Go Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Context
$top, $topN, $bottom, $bottomN already exist in mql/agg/accumulator.go as accumulator constructors (no input arg). This ticket implements their expression forms, which are distinct: the expression versions take an explicit input array and are used in $project stages, not $group. Name them Top, TopN, Bottom, BottomN (no conflict since the accumulator versions have the Accumulator suffix).
Definition of Done
- All of the following operators are implemented in mql/agg/operator.go, each with a one-line doc comment:
-
- $size, $reverseArray, $arrayElemAt, $concatArrays, $slice, $allElementsTrue, $anyElementTrue, $indexOfArray, $setDifference, $setEquals, $setIntersection, $setIsSubset, $setUnion, $range, $first, $last, $firstN, $lastN, $maxN, $minN, $zip, $sortArray, $top, $topN, $bottom, $bottomN (expression forms)
- Each operator has at least one test in mql/agg/operator_test.go