[SERVER-61056] N from MaxN not accepting max uint64 , likely the same for the other "TopN" functions Created: 27/Oct/21 Updated: 27/Oct/23 Resolved: 28/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Steve La (Inactive) | Assignee: | Backlog - Query Execution |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Repro steps Using the schema defined in the testfile jstests/aggregation/accumulators/min_n_max_n.js
Do this coll.aggregate([ {$group: {_id: '$state', maxSales: {$maxN: {output: '$sales', n: NumberDecimal("18446744073709551615")}}}}, {$sort: {_id: 1}} ]) with original command request: { } } }, } on connection: connection to 127.0.0.1:27017 : aggregate failed :
If I use max signed int64, I don't get the error, but if I add 1 to it, I get back the error. coll.aggregate([ {$group: {_id: '$state', maxSales: {$maxN: {output: '$sales', n: NumberDecimal("9223372036854775807")}}}}, {$sort: {_id: 1}} ]) { "_id" : "CA", "maxSales" : [ 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100 ] } { "_id" : "NY", "maxSales" : [ 700, 600, 500, 400, 300, 200, 100 ] } { "_id" : "TX", "maxSales" : [ 400, 300, 200, 100 ] }> coll.aggregate([ {$group: {_id: '$state', maxSales: {$maxN: {output: '$sales', n: NumberDecimal("9223372036854775808")}}}}, {$sort: {_id: 1}} ]) with original command request: { } } }, } on connection: connection to 127.0.0.1:27017 : aggregate failed : |
||||||||
| Participants: | |||||||||
| Description |
|
External Impact: |