[SERVER-6144] Aggregation should error out on divide or mod by zero Created: 20/Jun/12 Updated: 31/May/17 Resolved: 17/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Original Title: dividing by zero makes field disappear ExpressionDivide returns Undefined on divide by zero, which causes the field to be dropped. Might be more appropriate to return +/- Infinity or NaN.
Observed behavior: A field is removed on attempt to set its value to the output of a division by zero. The same occurs when attempting to mod by zero:
|
| Comments |
| Comment by auto [ 15/Dec/12 ] |
|
Author: {u'date': u'2012-12-14T21:02:41Z', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: Improve aggregation handling of nullish Values - part 2 Changes:
Related Tickets: |
| Comment by Mathias Stearn [ 13/Dec/12 ] |
|
In 2.4 dividing or moding by zero will cause the pipeline to error out. |
| Comment by auto [ 11/Dec/12 ] |
|
Author: {u'date': u'2012-12-05T23:55:25Z', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: Normalize handling of Undefined vs EOO/missing in agg Related tickets: |