-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
ALL
The greater than and less than operator that compare NumberDecimals against each other seem to compare the string value rather than the actual numeric values against each other. See this repro:
Less than operator:
build/install/bin/mongo --nodb ================ Welcome to the MongoDB shell > let v1 = NumberDecimal("11"); > let v2 = NumberDecimal("2"); > let lt = v1 < v2; > lt true
Greater than operator:
> build/install/bin/mongo --nodb ================ > let v1 = NumberDecimal("11"); > let v2 = NumberDecimal("2"); > let gt = v1 > v2; > gt false
- has to be done before
-
SERVER-90625 QueryStats for sum of squares execution time overflows its int64_t
- Closed
- is related to
-
SERVER-47200 how to compare two NumberDecimal digits in javascript
- Closed