diff options
Diffstat (limited to 'jstests/cqf/sort_project.js')
-rw-r--r-- | jstests/cqf/sort_project.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/cqf/sort_project.js b/jstests/cqf/sort_project.js index 0e953f91f30..5c071490222 100644 --- a/jstests/cqf/sort_project.js +++ b/jstests/cqf/sort_project.js @@ -34,9 +34,11 @@ try { { // Covered plan. Also an index scan on all fields is cheaper than a collection scan. - const res = coll.explain("executionStats").aggregate([ + // TODO SERVER-71553 The Cost Model is overriden to preserve IndexScan plan. + const res = runCommandWithCostModel(() => coll.explain("executionStats").aggregate([ {'$project': {_id: 0, f_0: 1, f_1: 1, f_2: 1, f_3: 1, f_4: 1}} - ]); + ]), + {"indexScanStartupCost": 1e-9}); assert.eq(nDocs, res.executionStats.nReturned); assertValueOnPlanPath("IndexScan", res, "child.child.nodeType"); } |