diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-06-27 15:03:43 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-06-27 15:03:43 -0400 |
commit | beaeaa196e8b1d3e36dfccd55cfded8ddf95a205 (patch) | |
tree | cd96ebd38a956f8817c57e752c27969b8a3e54a5 /src/mongo/db/matcher/expression_leaf.cpp | |
parent | 1871da3e8a38e7ac384c7bc0280017852f53d487 (diff) | |
download | mongo-beaeaa196e8b1d3e36dfccd55cfded8ddf95a205.tar.gz |
Revert "SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions"
This reverts commit a92eb118cc8500a9c4286e8ef28cb26ea3f4e238.
Diffstat (limited to 'src/mongo/db/matcher/expression_leaf.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_leaf.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp index d1d9ad08567..4980986f9d4 100644 --- a/src/mongo/db/matcher/expression_leaf.cpp +++ b/src/mongo/db/matcher/expression_leaf.cpp @@ -39,7 +39,6 @@ #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" @@ -656,6 +655,9 @@ 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); @@ -794,7 +796,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 >= MatchExpressionParser::kLongLongMaxPlusOneAsDouble || + if (eDouble >= kLongLongMaxPlusOneAsDouble || eDouble < std::numeric_limits<long long>::min()) { return false; } |