I came across a simple case in the classic engine where $multiply throws an error when it shouldn't. Here is the repro:
> db.adminCommand({setParameter: 1, internalQueryForceClassicEngine: true});
> db.c.drop();
> db.c.insert({a: 1.0});
> db.c.find({}, {x: {$multiply: ["$a", 1.0e+35]}})
When I run the commands above in the classic engine, I get the following error:
"Executor error during find command :: caused by :: Can't coerce out of range value -9.8696e+34 to long"
The example above is simply multiplying the double 1.0 by the double 1.0e+35. There is no reason that this operation should fail.
The goal of this task is to investigate why the failure described above is occurring, and to implement the appropriate fix.
As part of this work, once the issue is solved, $multiply should be marked as sbe-compatible again (undoing SERVER-60583.)
- is related to
-
SERVER-60584 Write a test to ensure SBE's implementation of multiply succeeds in edge cases
- Closed