Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
3.4.10
-
Query Optimization
Description
The query comparison operators have a handled case for NaN
This behavior is not aligned with the Comparison Aggregation Operators and provides different result when used i.e. in $match pipeline stage or in a $project stage.
Query : src/mongo/db/matcher/expression_leaf.cpp
// Special case handling for NaN. NaN is equal to NaN but
|
// otherwise always compares to false.
|
Pipeline: src/mongo/db/pipeline/value.cpp
return compareInts(rL._storage.intValue, rR._storage.intValue);
|