-
Notifications
You must be signed in to change notification settings - Fork 629
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
Support for Float from std package math/big #767
Comments
Any particular reason? The decimal type in Cassandra are infinite precision decimals which are encoded with a scale and an unscaled part, as far as I am aware the |
I need to convert to and from a swagger model. The model is generated using go-swagger which converts swagger "decimal numbers" to float64. The problem is that there is no easy conversion between those two. |
Are those floating point numbers or arbitrary precision decimals? |
Those values are regular javascript floating point numbers on the wire. I'm using java.lang.BigDecimal for calculations the client side though |
Then your losing precision over the wire, |
You are right. That's why I don't want to loose more precision converting values. Maybe new types will be added with OAI/OpenAPI-Specification#607 |
There is a proposal to a big decimal type to the standard library see golang/go#12127 but that wont solve the issue of the incompatible types you are encountering. I would recommend converting them to strings or such and then converting back to the decimal type. Unless you have any suggestions I don't see how to implement the decimal type in Cassandra with the types in |
Currently "big" types from c* are mapped using "gopkg.in/inf.v0". Please add support for the std library math/big
The text was updated successfully, but these errors were encountered: