diff options
author | Ian Boros <ian.boros@mongodb.com> | 2020-01-28 19:11:56 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-28 19:11:56 +0000 |
commit | ccc13ef0b7ce0f908479522660a54dcbd142f7a1 (patch) | |
tree | c8466e928795086932bac2825d84d6f98106844b /src/mongo/db/query/index_bounds.cpp | |
parent | 60282a8880a63920d376f358e0352051136383dc (diff) | |
download | mongo-ccc13ef0b7ce0f908479522660a54dcbd142f7a1.tar.gz |
SERVER-31898 Allow multikey indexes to provide sorts in certain cases
Diffstat (limited to 'src/mongo/db/query/index_bounds.cpp')
-rw-r--r-- | src/mongo/db/query/index_bounds.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/query/index_bounds.cpp b/src/mongo/db/query/index_bounds.cpp index bea6a10f75a..fb638d39727 100644 --- a/src/mongo/db/query/index_bounds.cpp +++ b/src/mongo/db/query/index_bounds.cpp @@ -240,6 +240,10 @@ Interval::Direction OrderedIntervalList::computeDirection() const { : Interval::Direction::kDirectionDescending; } +bool OrderedIntervalList::isMinToMax() const { + return intervals.size() == 1 && intervals[0].isMinToMax(); +} + // static void OrderedIntervalList::complement() { BSONObjBuilder minBob; |