summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server22093.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/bugs/server22093.js')
-rw-r--r--jstests/aggregation/bugs/server22093.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/jstests/aggregation/bugs/server22093.js b/jstests/aggregation/bugs/server22093.js
index a3bc05de53a..aca39a4e789 100644
--- a/jstests/aggregation/bugs/server22093.js
+++ b/jstests/aggregation/bugs/server22093.js
@@ -22,14 +22,17 @@ load('jstests/libs/analyze_plan.js');
assert.eq(simpleGroup.length, 1);
assert.eq(simpleGroup[0]["count"], 15);
- var explained = coll.explain().aggregate([{$match: {foo: {$gt: 0}}},
- {$group: {_id: null, count: {$sum: 1}}}]);
+ var explained =
+ coll.explain()
+ .aggregate([{$match: {foo: {$gt: 0}}}, {$group: {_id: null, count: {$sum: 1}}}]);
assert(planHasStage(explained.stages[0].$cursor.queryPlanner.winningPlan, "COUNT_SCAN"));
- explained = coll.explain().aggregate([{$match: {foo: {$gt: 0}}},
- {$project: {_id: 0, a: {$literal: null}}},
- {$group: {_id: null, count: {$sum: 1}}}]);
+ explained = coll.explain().aggregate([
+ {$match: {foo: {$gt: 0}}},
+ {$project: {_id: 0, a: {$literal: null}}},
+ {$group: {_id: null, count: {$sum: 1}}}
+ ]);
assert(planHasStage(explained.stages[0].$cursor.queryPlanner.winningPlan, "COUNT_SCAN"));
}());