summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/index_bounds.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2020-01-28 19:11:56 +0000
committerevergreen <evergreen@mongodb.com>2020-01-28 19:11:56 +0000
commitccc13ef0b7ce0f908479522660a54dcbd142f7a1 (patch)
treec8466e928795086932bac2825d84d6f98106844b /src/mongo/db/query/index_bounds.cpp
parent60282a8880a63920d376f358e0352051136383dc (diff)
downloadmongo-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.cpp4
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;