Open cucuzi opened 2 years ago
@cucuzi Thank you for your contribution, I will investigate this issue.
Hello , this issue has not received a reply for several days. This issue is supposed to be closed.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Bug Report
I select a list, but the decimal is wrong.
using shardingsphere-jdbc: 5.1.0
Expected behavior
list string: [BookClassStatistic(classChar=A, classNum=2, bookNum=3, sumPrice=89.10), BookClassStatistic(classChar=B, classNum=2, bookNum=3, sumPrice=121.60), BookClassStatistic(classChar=D, classNum=2, bookNum=2, sumPrice=38.80), BookClassStatistic(classChar=Z, classNum=1, bookNum=2, sumPrice=5.52)]
By the way, changing database field ( book.price ) type to decimal will get true result.
Actual behavior
list string: [BookClassStatistic(classChar=A, classNum=2, bookNum=3, sumPrice=89.10000228881836), BookClassStatistic(classChar=B, classNum=2, bookNum=3, sumPrice=121.5999984741211), BookClassStatistic(classChar=D, classNum=2, bookNum=2, sumPrice=38.79999923706055), BookClassStatistic(classChar=Z, classNum=1, bookNum=2, sumPrice=5.519999980926514)]
Example codes
SELECT SQL
Object
Sharding rule
SQL FILE demo1.zip