Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
4.0.6
-
Fully Compatible
-
ALL
-
Query 2020-06-29, Query 2020-07-13
-
44
Description
db.foo.aggregate({$addFields:{x:{$substr:[{$literal:"xxxxxxxx"}, 0, NumberDecimal("5")]}}})
|
2018-09-10T14:40:15.878-0400 E QUERY [js] Error: command failed: {
|
"ok" : 0,
|
"errmsg" : "$substrBytes: length must be a numeric type (is BSON type decimal)",
|
"code" : 16035,
|
"codeName" : "Location16035"
|
} : aggregate failed
|
|
// same for other string functions
|
[js] Error: command failed: {
|
"ok" : 0,
|
"errmsg" : "$substrBytes: length must be a numeric type (is BSON type decimal)",
|
"code" : 16035,
|
"codeName" : "Location16035"
|
} : aggregate failed :
|
Decimal should be treated like other numeric types and be valid.