-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
In the documentation, the list of types supporting conversion to boolean does not match the implementation.
https://docs.mongodb.com/manual/reference/operator/aggregation/convert/
https://docs.mongodb.com/manual/reference/operator/aggregation/toBool/#mongodb-expression-exp.-toBool
All missing types except Undefined return true unconditionally :
https://github.com/10gen/mongo/blob/2fa18e5051b2c3487a9bc5fb8a38a96cdf52dbc0/src/mongo/db/pipeline/expression.cpp#L6129
Please let me know if you need more details.