diff options
author | David Storch <david.storch@mongodb.com> | 2019-09-04 21:28:21 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-04 21:28:21 +0000 |
commit | bac2b16a61498a65cbd61da0e15235363e7e77b9 (patch) | |
tree | dc2bfcad49e8847f8d5afc9e94093a545e79bd60 /src/mongo/db/matcher/expression_tree.cpp | |
parent | 5ed5b857aaf2e2fbf443588e9b4cbb359fbd1f4d (diff) | |
download | mongo-bac2b16a61498a65cbd61da0e15235363e7e77b9.tar.gz |
SERVER-42090 Ensure query planner produces a stable ordering of OR branches.
Diffstat (limited to 'src/mongo/db/matcher/expression_tree.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_tree.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mongo/db/matcher/expression_tree.cpp b/src/mongo/db/matcher/expression_tree.cpp index cb1eb248898..f03d49bce2d 100644 --- a/src/mongo/db/matcher/expression_tree.cpp +++ b/src/mongo/db/matcher/expression_tree.cpp @@ -217,7 +217,13 @@ bool AndMatchExpression::matchesSingleElement(const BSONElement& e, MatchDetails void AndMatchExpression::debugString(StringBuilder& debug, int indentationLevel) const { _debugAddSpace(debug, indentationLevel); - debug << "$and\n"; + debug << "$and"; + MatchExpression::TagData* td = getTag(); + if (td) { + debug << " "; + td->debugString(&debug); + } + debug << "\n"; _debugList(debug, indentationLevel); } @@ -260,7 +266,13 @@ bool OrMatchExpression::matchesSingleElement(const BSONElement& e, MatchDetails* void OrMatchExpression::debugString(StringBuilder& debug, int indentationLevel) const { _debugAddSpace(debug, indentationLevel); - debug << "$or\n"; + debug << "$or"; + MatchExpression::TagData* td = getTag(); + if (td) { + debug << " "; + td->debugString(&debug); + } + debug << "\n"; _debugList(debug, indentationLevel); } |