[SERVER-33757] Treat an illegal target type in $convert as an "onError" case Created: 08/Mar/18 Updated: 29/Oct/23 Resolved: 21/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Justin Seyster | Assignee: | Justin Seyster |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Query 2018-03-12, Query 2018-03-26 | ||||||||
| Participants: | |||||||||
| Description |
|
Currently, an illegal target type (e.g., "minKey") results in a query failure, even if there is an "onError" value. This means that attempting to pass the return value of a $type expression as the "to" parameter can result in a failure. With this change, an invalid target type will instead return the "onError" value when it is present. Note that a string or number that does not map to any type will still result in an error in all cases. |
| Comments |
| Comment by Githook User [ 21/Mar/18 ] |
|
Author: {'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}Message: |
| Comment by Asya Kamsky [ 15/Mar/18 ] |
|
So rather than "invalid" type, would it be more accurate to say this will return "onError" on unsupported "to" type? |