SuJinpei opened a new pull request #1777: [TRAFODION-3262] Insert float to 
numeric(19,0) lost precision for some case.
URL: https://github.com/apache/trafodion/pull/1777
 
 
   **root cause:**  when the target numeric type's precision is bigger than 18, 
the source float or double data will first be converted to char string which 
will call the double_to_char function, then transfer to the server. original 
double_to_char only keep '**precision**' significant digits. In this case, the 
caller provides the precision with 6 for float datatype, so last 2 digits' 
precision lost.
   **solution:** now, the '**precision**' parameter means the number of digits 
after the decimal point which is the caller really meant to do. To prevent 
precision lost,  the conversion will fail if the caller doesn't provide enough 
space to receive the result.
   **verify:**  no new issue was found by running coast to verify the fix.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to