[SERVER-69865] Primitive arithmetic operations in SBE promote int64 to decimal128 instead of double Created: 21/Sep/22 Updated: 24/Aug/23 Resolved: 21/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ivan Fefer | Assignee: | Ivan Fefer |
| Resolution: | Declined | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | 1. Run mongod with --setParameter featureFlagSbeFull=true Expected: { "_id" : ObjectId("632b0eeab16205c4487fd24e"), "sum" : -18000000000000000000, "st" : "double" } |
||||
| Participants: | |||||
| Description |
|
Currently if result of primitive arithmetic operation in SBE doesn't fit into int64, it will be promoted to decimal128: 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. |
| Comments |
| Comment by Ivan Fefer [ 21/Sep/22 ] |
|
Currently it is not decided if it is a bug or a feature. |