[SERVER-32859] Improve error message when sorting parallel arrays Created: 23/Jan/18 Updated: 30/Oct/23 Resolved: 04/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.3 |
| Type: | Task | Priority: | Trivial - P5 |
| Reporter: | Kelsey Schubert | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
The current error message states:
I would suggest removing the term parallel array for something more user-friendly, like "cannot sort on multiple fields containing arrays" |
| Comments |
| Comment by Githook User [ 04/Mar/18 ] |
|
Author: {'email': 'dandanlin.l@gmail.com', 'name': '“Dandan', 'username': 'Dandanlin0702'}Message: Closes #1218 Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com> |
| Comment by Charlie Swanson [ 04/Mar/18 ] |
|
Assigning to myself to review & merge, since I'm working with Dandan as part of a CUNY course. |
| Comment by David Storch [ 22/Feb/18 ] |
|
kelsey.schubert, I couldn't come up with better wording. The difficulty is that sorting on nested arrays is fine (e.g. sort({"a.b": 1}) where both "a" and "a.b" are arrays) and sorting on multiple subfields of the same array is also fine (e.g. sort({"a.b": 1, "a.c": 1}) where "a" is an array). This complexity is hard to capture in a short error message. Anyway, LGTM to merge, unless you can think of a better message. |
| Comment by Kelsey Schubert [ 22/Feb/18 ] |
|
david.storch, we have an open pull request to change the logging from "cannot sort with keys that are parallel arrays" If you agree with the wording, let me know and I'll go through the motions get it merged into master. Otherwise would please you suggest a preferable logging message? Thanks, |