Details
-
Bug
-
Resolution: Declined
-
Major - P3
-
None
-
None
-
None
-
None
-
ALL
-
Description
Currently if result of primitive arithmetic operation in SBE doesn't fit into int64, it will be promoted to decimal128:
https://github.com/mongodb/mongo/blob/master/src/mongo/db/exec/sbe/values/arith_common.cpp#L144
This contradicts documentation in some cases: https://www.mongodb.com/docs/manual/reference/operator/aggregation/subtract/#behavior
We don't want to expose decimal to users unless asked explicitly because it is not supported widely.