oceanbase / odc

OceanBase Developer Center(ODC), An open-source, enterprise-grade database tool for collaborative development
https://github.com/oceanbase/odc
Apache License 2.0
536 stars 55 forks source link

[Enhancement]: MySQL租户,将显示为科学计数法的小数正常显示成小数 #762

Closed mermingmark closed 11 months ago

mermingmark commented 11 months ago

What would you like to be added?

ODC Server: 4.2.1-20231009

CREATE TABLE tn (c1 decimal(20,7) ) ; insert into c1 values (0.0000000);

期望正常显示为小数 image

image

Why is this needed?

开发测试阶段使用方便

yhilmare commented 11 months ago

这个似乎只有对0才是这样的,我们做一下兼容吧,4.2.2修复,预计本月中下旬发布 @mermingmark

yhilmare commented 11 months ago
截屏2023-11-10 15 41 25
yhilmare commented 11 months ago

fixed

yhilmare commented 11 months ago

driver 从协议中获取的值是没错的,但是getString的过程中会将其转成BigDecimal,如果小数点后的 0 超过 6 位,那么BigDecimal#toString的时候就会使用科学记数法,造成这个问题。

tonghan-gsh commented 11 months ago

pass.