diff options
author | Sophie Saskin <sophie.saskin@mongodb.com> | 2019-12-20 19:08:01 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-20 19:08:01 +0000 |
commit | 21abe36245600807b68198de636d368f96e669d7 (patch) | |
tree | c0894abe7ea44d2c3cbbb91f02ff342605265ba0 /src/mongo/bson/bsonobjbuilder.cpp | |
parent | 3fea6b339770dcdead06803b0c794553c25b94fb (diff) | |
download | mongo-21abe36245600807b68198de636d368f96e669d7.tar.gz |
SERVER-41700 query $type:xxx defaults to exact bounds or inexact covered bounds whenever possible
Diffstat (limited to 'src/mongo/bson/bsonobjbuilder.cpp')
-rw-r--r-- | src/mongo/bson/bsonobjbuilder.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/bson/bsonobjbuilder.cpp b/src/mongo/bson/bsonobjbuilder.cpp index 369f307beb4..13133acf5c8 100644 --- a/src/mongo/bson/bsonobjbuilder.cpp +++ b/src/mongo/bson/bsonobjbuilder.cpp @@ -54,9 +54,7 @@ BSONObjBuilder& BSONObjBuilder::appendMinForType(StringData fieldName, int t) { append(fieldName, ""); return *this; case Date: - // min varies with V0 and V1 indexes, so we go one type lower. - appendBool(fieldName, true); - // appendDate( fieldName , numeric_limits<long long>::min() ); + appendDate(fieldName, Date_t::min()); return *this; case bsonTimestamp: appendTimestamp(fieldName, 0); @@ -125,8 +123,7 @@ BSONObjBuilder& BSONObjBuilder::appendMaxForType(StringData fieldName, int t) { appendMinForType(fieldName, Object); return *this; case Date: - appendDate(fieldName, - Date_t::fromMillisSinceEpoch(std::numeric_limits<long long>::max())); + appendDate(fieldName, Date_t::max()); return *this; case bsonTimestamp: append(fieldName, Timestamp::max()); |