[SERVER-85081] Standardize behavior of non-string inputs to string expressions Created: 12/Feb/18 Updated: 12/Jan/24 Resolved: 22/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Charlie Swanson |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Some string expressions such as $substr, $substrBytes, $substrCP, $strcasecmp, $toLower and $toUpper will coerce their inputs to a string, allowing numbers, code, etc. to be converted as input. Others, such as $strLenBytes and $strLenCP will only allow string inputs, resulting in an error on any other input. Still others, such as $trim, $rtrim, $ltrim, $indexOfBytes, $indexOfCP, $split, and $concat will return null on any nullish input, and only accept strings otherwise. We need to decide which of these behaviors is most useful and most consistent, and update the others to be consistent. |
| Comments |
| Comment by David Storch [ 22/Mar/18 ] |
|
I think this was an artifact for some work that was maybe going to be in scope for type conversions. But that ship has sailed. Closing. |
| Comment by Ian Whalen (Inactive) [ 22/Mar/18 ] |
|
Closing it is fine by me. Not sure what motivated it in the first place. |
| Comment by David Storch [ 22/Mar/18 ] |
|
ian.whalen charlie.swanson, I'm not quite sure what to do with this ticket. Should we just close it? Is there some backlog we should put it on? I don't think we intend for Charlie to actually be working on it right now. |