diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2017-06-27 15:26:26 -0400 |
---|---|---|
committer | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2017-06-27 17:57:36 -0400 |
commit | 8aa235f5b5eb82223cee67433df4cb78e19d10c5 (patch) | |
tree | 6974625936875735fd0153d0739631cd64512814 /src/mongo/db/matcher/expression_leaf.cpp | |
parent | 9c65741b29f592379be4114f651849e8dde856b6 (diff) | |
download | mongo-8aa235f5b5eb82223cee67433df4cb78e19d10c5.tar.gz |
SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions
Diffstat (limited to 'src/mongo/db/matcher/expression_leaf.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_leaf.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp index 4980986f9d4..d1d9ad08567 100644 --- a/src/mongo/db/matcher/expression_leaf.cpp +++ b/src/mongo/db/matcher/expression_leaf.cpp @@ -39,6 +39,7 @@ #include "mongo/config.h" #include "mongo/db/field_ref.h" #include "mongo/db/jsobj.h" +#include "mongo/db/matcher/expression_parser.h" #include "mongo/db/matcher/path.h" #include "mongo/db/query/collation/collator_interface.h" #include "mongo/stdx/memory.h" @@ -655,9 +656,6 @@ Status InMatchExpression::addRegex(std::unique_ptr<RegexMatchExpression> expr) { // ----------- -const double BitTestMatchExpression::kLongLongMaxPlusOneAsDouble = - scalbn(1, std::numeric_limits<long long>::digits); - Status BitTestMatchExpression::init(StringData path, std::vector<uint32_t> bitPositions) { _bitPositions = std::move(bitPositions); @@ -796,7 +794,7 @@ bool BitTestMatchExpression::matchesSingleElement(const BSONElement& e) const { // integer are treated as 0. We use 'kLongLongMaxAsDouble' because if we just did // eDouble > 2^63-1, it would be compared against 2^63. eDouble=2^63 would not get caught // that way. - if (eDouble >= kLongLongMaxPlusOneAsDouble || + if (eDouble >= MatchExpressionParser::kLongLongMaxPlusOneAsDouble || eDouble < std::numeric_limits<long long>::min()) { return false; } |