Details
-
Bug
-
Resolution: Fixed
-
Minor - P4
-
3.6.1
-
None
-
0.1
Description
Description
In the example of https://docs.mongodb.org/manual/reference/operator/aggregation/allElementsTrue/#exp._S_allElementsTrue , the command
db.survey.aggregate([
|
{ $project: { responses: 1, isAllTrue: { $allElementsTrue: [ "$responses" ] }, _id: 0 } }
|
])
|
should return the result
...
|
|
|
{ "responses" : [ {color:#ff0000}undefined{color} ], "isAllTrue" : false }
|
{ "responses" : [ null ], "isAllTrue" : false }
|
instead of the documented result
...
|
|
|
{ "responses" : [ {color:#ff0000}null{color} ], "isAllTrue" : false }
|
{ "responses" : [ null ], "isAllTrue" : false }
|
The same bug also applies for
https://docs.mongodb.org/manual/reference/operator/aggregation/anyElementTrue/#exp._S_anyElementTrue
Scope of changes
- Validate bug
- apply to 3.2+ (3.0 and earlier shell would return null as documented – see
DOCS-6579/SERVER-6102