chenhao7253886 opened a new pull request #283: Fix truncation error in CastExpr
URL: https://github.com/apache/incubator-doris/pull/283
 
 
   round result is't be truncated, wrong result is:
   
   mysql> select cast(round(26107/1232, 2) as char);
   +-----------------------------------------------+
   | CAST(round(26107.0 / 1232.0, 2) AS CHARACTER) |
   +-----------------------------------------------+
   | 21.190000000000001                            |
   +-----------------------------------------------+
   1 row in set (0.02 sec)
   
   the result should be:
   mysql> select cast(round(26107/1232, 2) as char);   
   +-----------------------------------------------+
   | CAST(round(26107.0 / 1232.0, 2) AS CHARACTER) |
   +-----------------------------------------------+
   | 21.19                                         |
   +-----------------------------------------------+
   1 row in set (0.01 sec)

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to