summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_algo.cpp
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2017-08-24 13:23:41 -0400
committerNick Zolnierz <nicholas.zolnierz@mongodb.com>2017-09-19 13:47:58 -0400
commit4574a7c8dd12650eceee1e197b35ba47dfbb7f8e (patch)
tree9709578bb7347d0395e900b7ccace7b4cb5c156d /src/mongo/db/matcher/expression_algo.cpp
parentaf7387affece778a2507666b8bc5f502778fe1b8 (diff)
downloadmongo-4574a7c8dd12650eceee1e197b35ba47dfbb7f8e.tar.gz
SERVER-30176: Extend the JSON Schema parser to handle logical restriction keywords (enum only)
Diffstat (limited to 'src/mongo/db/matcher/expression_algo.cpp')
-rw-r--r--src/mongo/db/matcher/expression_algo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/matcher/expression_algo.cpp b/src/mongo/db/matcher/expression_algo.cpp
index 609eef099e6..3bd30006f00 100644
--- a/src/mongo/db/matcher/expression_algo.cpp
+++ b/src/mongo/db/matcher/expression_algo.cpp
@@ -89,9 +89,10 @@ bool _isSubsetOf(const ComparisonMatchExpression* lhs, const ComparisonMatchExpr
return false;
}
- // Either collator may be used by compareElementValues() here, since either the collators are
+ // Either collator may be used by compareElements() here, since either the collators are
// the same or lhsData does not contain string comparison.
- int cmp = compareElementValues(lhsData, rhsData, rhs->getCollator());
+ int cmp = BSONElement::compareElements(
+ lhsData, rhsData, BSONElement::ComparisonRules::kConsiderFieldName, rhs->getCollator());
// Check whether the two expressions are equivalent.
if (lhs->matchType() == rhs->matchType() && cmp == 0) {