-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
$mod match expression semantics was changed to:
(1) for dividend parameter - to not match a document if dividend value is either NaN or Infinity; to throw an exception if the rounded dividend value cannot be represented as a 64-bit integer;
(2) for divisor, remainder parameters - to throw an exception if value is either NaN or Infinity, or the rounded value cannot be represented as a 64-bit integer.
Description of Linked Ticket
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".
- documents
-
SERVER-57321 $mod match expression incorrectly handles NaN, Infinity and large values
- Closed