diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:42:24 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-26 18:42:24 -0400 |
commit | c1a45ebbb0530e3d0201321d725527f1eb83ffce (patch) | |
tree | f523079dc5ded3052eefbdcaae424b7502df5b25 /jstests/core/optimized_match_explain.js | |
parent | c9599d8610c3da0b7c3da65667aff821063cf5b9 (diff) | |
download | mongo-c1a45ebbb0530e3d0201321d725527f1eb83ffce.tar.gz |
Apply formatting per `clang-format-7.0.1`
Diffstat (limited to 'jstests/core/optimized_match_explain.js')
-rw-r--r-- | jstests/core/optimized_match_explain.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/jstests/core/optimized_match_explain.js b/jstests/core/optimized_match_explain.js index 6f73349e08c..5575b8498bb 100644 --- a/jstests/core/optimized_match_explain.js +++ b/jstests/core/optimized_match_explain.js @@ -4,22 +4,22 @@ * Tests that the explain output for $match reflects any optimizations. */ (function() { - "use strict"; - load("jstests/libs/analyze_plan.js"); +"use strict"; +load("jstests/libs/analyze_plan.js"); - const coll = db.match_explain; - coll.drop(); +const coll = db.match_explain; +coll.drop(); - assert.writeOK(coll.insert({a: 1, b: 1})); - assert.writeOK(coll.insert({a: 2, b: 3})); - assert.writeOK(coll.insert({a: 1, b: 2})); - assert.writeOK(coll.insert({a: 1, b: 4})); +assert.writeOK(coll.insert({a: 1, b: 1})); +assert.writeOK(coll.insert({a: 2, b: 3})); +assert.writeOK(coll.insert({a: 1, b: 2})); +assert.writeOK(coll.insert({a: 1, b: 4})); - // Explain output should reflect optimizations. - // $and should not be in the explain output because it is optimized out. - let explain = coll.explain().aggregate( - [{$sort: {b: -1}}, {$addFields: {c: {$mod: ["$a", 4]}}}, {$match: {$and: [{c: 1}]}}]); +// Explain output should reflect optimizations. +// $and should not be in the explain output because it is optimized out. +let explain = coll.explain().aggregate( + [{$sort: {b: -1}}, {$addFields: {c: {$mod: ["$a", 4]}}}, {$match: {$and: [{c: 1}]}}]); - assert.commandWorked(explain); - assert.eq(getAggPlanStage(explain, "$match"), {$match: {c: {$eq: 1}}}); +assert.commandWorked(explain); +assert.eq(getAggPlanStage(explain, "$match"), {$match: {c: {$eq: 1}}}); }()); |