[SERVER-29410] Enhance aggregation to handle handle NaN and +/- infinity Created: 31/May/17 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.4.4 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Rintcius Blok | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | mql-semantics | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
Pipeline expressions containing NaN and +/- infinity give a server error (e.g. "can't $divide by zero"). |
| Comments |
| Comment by Ramon Fernandez Marina [ 20/Jul/17 ] |
|
I'm reopening this issue for the Query team to weigh in on whether handling +inf/-inf/NaN in the aggregation pipeline is feasible; there are other related tickets so this request may be folded into one of them. |
| Comment by Rintcius Blok [ 12/Jun/17 ] |
|
Hi Mark, from my view the current behaviour looked like an obvious bug (and it still does, to be clear) so that's why I reported it here rather than in the Mongo user group. The original bug report of https://jira.mongodb.org/browse/SERVER-6144 looks completely reasonable to me:
However, I don't understand the reasoning behind how it got fixed. To me, the behaviour that was apparently there before https://jira.mongodb.org/browse/SERVER-6144 got fixed looks a lot better than how it behaves now: before the fix the query didn't crash, it merely returned values that could be slightly improved (from undefined to NaN and +/- infinity). |
| Comment by Mark Agarunov [ 09/Jun/17 ] |
|
Hello rintcius, Thank you for the report. Looking over the behavior you've described, this appears to be working as designed. Due to the changes listed in Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. Thanks, |
| Comment by Rintcius Blok [ 31/May/17 ] |
|
(comment obsolete because formatting is now improved in "steps to reproduce" section) |