[SERVER-55124] $derivative should return null on a 1-element window Created: 10/Mar/21 Updated: 27/Oct/23 Resolved: 21/Apr/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | David Percy |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | Query Optimization 2021-04-05, Query Optimization 2021-04-19, Query Optimization 2021-05-03 |
| Participants: |
| Description |
|
Currently I don't think it handles this case specially, so it would divide 0/0 and return NaN. |
| Comments |
| Comment by David Percy [ 21/Apr/21 ] | ||||||||||
|
Looks like I was mistaken about this:
I thought {$divide: [0.0, 0.0]} would be NaN, but it's an error, which $derivative handles. |