summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Zolnierz <nicholas.zolnierz@mongodb.com>2022-11-02 11:35:09 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-02 17:21:30 +0000
commit4918766c688e86274aaade30f8e637415df13ba7 (patch)
treee9784c55a2c7ea33fa3646d8c9cc8e064e52f7fc
parentca80f7fd6d45668710fa836c8d35d7da43f0cab6 (diff)
downloadmongo-4918766c688e86274aaade30f8e637415df13ba7.tar.gz
SERVER-70986 Remove dead code check in ABT translation
-rw-r--r--src/mongo/db/pipeline/abt/utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/abt/utils.cpp b/src/mongo/db/pipeline/abt/utils.cpp
index a1f51346cd7..9911e090305 100644
--- a/src/mongo/db/pipeline/abt/utils.cpp
+++ b/src/mongo/db/pipeline/abt/utils.cpp
@@ -94,7 +94,7 @@ ABT translateFieldRef(const FieldRef& fieldRef, ABT initial) {
for (size_t i = fieldPathLength; i-- > 0;) {
// A single empty field path will parse to a FieldRef with 0 parts but should
// logically be considered a single part with an empty string.
- if (fieldPathLength > 0 && i != fieldPathLength - 1) {
+ if (i != fieldPathLength - 1) {
// For field paths with empty elements such as 'x.', we should traverse the
// array 'x' but not reach into any sub-objects. So a predicate such as {'x.':
// {$eq: 5}} should match {x: [5]} and {x: {"": 5}} but not {x: [{"": 5}]}.