In classic variant of query execution $mod match expression (ModMatchExpression) interprets dividend value NaN (double) as -9223372036854775808 64-bit integer. In SBE, on the other hand, NaN to 64-bit integer transformation results in Nothing. Furthermore, NumberDecimal("9.999999999999999999999999999999999E+6144") gets interpreted as NumberLong("-9223372036854775808") (classic and SBE). Those two factors, when combined, give unexpected results. Please see "Steps to Reproduce".
- causes
-
SERVER-58874 Coverity analysis defect 120344: Operands don't affect result
- Closed
- is duplicated by
-
SERVER-58188 Inconsistency between the classic engine and SBE: {$mod: [-Infinity, NumberLong("0")]}
- Closed