You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix float to string conversion for boundary values (#3656)
In #3413 , we added new Cast functions for float to varchar/char conversion . We were using the postgres double_to_shortest_decimal_buf API to convert float to string , which would return special values like Infinity/-Infinity for very big/small values , also we were using rounding logic by multiplication and then dividing the result which could result in overflow, Now we fallback to string formatting using psprintf (postgres flavour of printf) and format specifier to fix the precision.
This change also solves the CONVERT function not working correctly with very small float values .
Issues Resolved
BABEL-5709
Cherry-pick #3654
Co-authored-by: Nirmit Shah <nirmisha@amazon.com>
0 commit comments