[SERVER-56849] Improve error reporting for $setWindowFields Created: 11/May/21 Updated: 25/Feb/22 Resolved: 07/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Query Parsing |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Ruslan Abdulkhalikov (Inactive) | Assignee: | Maddie Zechar |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | Query Optimization 2021-05-31, Query Optimization 2021-06-14 |
| Participants: |
| Description |
fails with "errmsg" : "Unrecognized window function" |
| Comments |
| Comment by Maddie Zechar [ 07/Jun/21 ] | |||||||
|
commit queue merge patch succeeded https://spruce.mongodb.com/version/60be4ca1a4cf4749c8188c44/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC | |||||||
| Comment by Githook User [ 07/Jun/21 ] | |||||||
|
Author: {'name': 'Maddie Zechar', 'email': 'mez2113@columbia.edu', 'username': 'madelinezec'}Message: | |||||||
| Comment by David Percy [ 20/May/21 ] | |||||||
|
It should probably also tell you what the unrecognized window function is. For example:
The parser is expecting "output: { <field name>: <window function> }", so in this example it would fail because it sees "b" where it expected a window function. A better error might say something like "No such window function "b", choices were ...". We could also see what $group does. |