[SERVER-75014] Unify format validation for $dateToString and $dateFromString in SBE Created: 17/Mar/23 Updated: 21/Mar/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jennifer Peshansky (Inactive) | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
In the classic engine, $dateToString and $dateFromString were validated using the validate...Format functions in date_time_support.cpp, which were void functions that would uassert if an invalid format was detected. When implementing $dateToString in SBE in However, while implementing $dateFromString in This ticket should, at a minimum, involve updating dateToString format validation to function in the same way, where detailed errors can be surfaced from uasserts within date_time_support. We should also consider either deleting the new isValid...Format functions inside the date_time_support library, or modifying them so that they can run the validation function, uassert, but still return a true/false value, so the SBE builtins can simply return TimeZone::isValid...StringFormat. It's possible the function where the actual validation happens, which was made into a templated function during |