[SERVER-12970] agg functions which coerceToString do weird things with larger floats Created: 28/Feb/14 Updated: 06/Dec/22 Resolved: 01/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 2.4.9, 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | usability | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Some aggregation functions will turn any type into a string. This gives really strange results in an example like this:
Apparently it's because larger floats coerce to string of format 1.xxxe+xx While $strcasecmp, $substr, $toLower and $toUpper all do this, only substr makes for such bizarre manifestation. |