Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'getBigDecimal' method has a precision of 0 by default #913

Closed
SurelySomeday opened this issue Apr 30, 2022 · 1 comment
Closed

The 'getBigDecimal' method has a precision of 0 by default #913

SurelySomeday opened this issue Apr 30, 2022 · 1 comment
Labels
Milestone

Comments

@SurelySomeday
Copy link

SurelySomeday commented Apr 30, 2022

When using a 'getBigDecimal' query, the 'ClickHouse DoubleValue' is returned, but when converting to 'BigDecimal', use 'scale=0' directly, which will result in a loss of precision.
Although there is such a way as 'getBigDecimal(v, scale)', the current JDBC specification should be deprecated, and the method 'getBigDecimal(v)' is normally used. I think it would be better to use 'BigDecimal.valueOf(v)' to maintain the correct precision.
image

@zhicwu zhicwu added the bug label Apr 30, 2022
@zhicwu
Copy link
Contributor

zhicwu commented Apr 30, 2022

Thanks @SurelySomeday, I'll fix this in patch9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants