summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough
diff options
context:
space:
mode:
authorDan Larkin-York <dan.larkin-york@mongodb.com>2022-04-22 00:02:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-22 00:42:29 +0000
commita0f786dca14008612eadeb7d37d30cfd7690f7ed (patch)
tree50b1a6c93462f4e59cd5ab137a5ca97a8da0b5cb /jstests/noPassthrough
parent46be98147821353da22d0e647ff06fdb7e6fa5c7 (diff)
downloadmongo-a0f786dca14008612eadeb7d37d30cfd7690f7ed.tar.gz
SERVER-65881 Support sort-limit optimization with bounded sort stage
Diffstat (limited to 'jstests/noPassthrough')
-rw-r--r--jstests/noPassthrough/timeseries_internal_bounded_sort_spilling.js25
1 files changed, 10 insertions, 15 deletions
diff --git a/jstests/noPassthrough/timeseries_internal_bounded_sort_spilling.js b/jstests/noPassthrough/timeseries_internal_bounded_sort_spilling.js
index bd5d7e9bcca..0014dc64d95 100644
--- a/jstests/noPassthrough/timeseries_internal_bounded_sort_spilling.js
+++ b/jstests/noPassthrough/timeseries_internal_bounded_sort_spilling.js
@@ -158,21 +158,16 @@ function assertSorted(result) {
assertSorted(naive);
assert.eq(100, naive.length);
- const opt = buckets
- .aggregate(
- [
- {$sort: {'control.min.t': 1}},
- unpackStage,
- {
- $_internalBoundedSort: {
- sortKey: {t: 1},
- bound: {base: "min"},
- }
- },
- {$limit: 100},
- ],
- {allowDiskUse: true})
- .toArray();
+ const opt =
+ buckets
+ .aggregate(
+ [
+ {$sort: {'control.min.t': 1}},
+ unpackStage,
+ {$_internalBoundedSort: {sortKey: {t: 1}, bound: {base: "min"}, limit: 100}}
+ ],
+ {allowDiskUse: true})
+ .toArray();
assertSorted(opt);
assert.eq(100, opt.length);