[SERVER-77503] $percentile accumulator doesn't accept variables from the "let" option Created: 25/May/23 Updated: 29/Oct/23 Resolved: 15/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Irina Yatsenko (Inactive) | Assignee: | Irina Yatsenko (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v7.0
|
||||||||
| Sprint: | QI 2023-06-12, QI 2023-06-26 | ||||||||
| Participants: | |||||||||
| Description |
|
Run:
Result: 'MongoServerError: BSON field '$percentile.p.0' is the wrong type 'string', expected types '[long, int, decimal, double]' It looks like the idl validation kicks in before the expression is substituted from the "let" option. |
| Comments |
| Comment by Githook User [ 15/Jun/23 ] | ||||||||||||||||||
|
Author: {'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}Message: | ||||||||||||||||||
| Comment by Githook User [ 15/Jun/23 ] | ||||||||||||||||||
|
Author: {'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}Message: | ||||||||||||||||||
| Comment by Slav Babanin [ 26/May/23 ] | ||||||||||||||||||
|
Based on my understanding, once the issue is fixed, it should resolve the use case below as well, which is referencing the whole array. Currently it results in error: MongoServerError: BSON field '$percentile.p' is the wrong type 'string', expected type 'array. irina.yatsenko@mongodb.com Could you please confirm if "referencing array from let" in p field is allowed operation? This is based on examples from Syntax: Discrete, Continuous and Approximate Percentile and Median Accumulator
|