You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've switched to using https://github.com/shopspring/decimal in my code where I need to support a decimal or money data type. The current implementation of decimal in the bulk loader code causes loss of resolution or unpredictable numbers to show up mainly due to the cast from a float32 to a float64 using the decimal package mitigates that for now. the decimal package supports the sql driver scanner and marshaling json so it is a snap to drop them into your structs and populate them.
apd/v2 just merged in support for the decomposer interface. There is an open CL to help support scanning from the decomposer interface here.
We should switch to using apd/v2 internally.
For all decimals, we should look for the decomposer interface.
We may choose to still support floats, but we should suggest a decimal package that supports decomposer.
Support for 'money' type in bulk import #430 Needs to move to using the decomposer as well, the current implementation of an implied pre-multiplied integer isn't something I want to support.
Decide how to support decimals.
Depends on pending CL for go1.9: https://go-review.googlesource.com/c/38533/
I propose using and supporting at least initially https://godoc.org/github.com/cockroachdb/apd (as well as converting from ints, floats, and strings).
The text was updated successfully, but these errors were encountered: