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

support decimals: planning #245

Open
kardianos opened this issue Apr 3, 2017 · 3 comments
Open

support decimals: planning #245

kardianos opened this issue Apr 3, 2017 · 3 comments
Assignees

Comments

@kardianos
Copy link
Collaborator

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).

@kardianos
Copy link
Collaborator Author

Go1.9 will support custom parameters. I would like decimal support for input parameters to take advantage of this.

@kardianos kardianos self-assigned this May 24, 2017
@SQLServerIO
Copy link

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.

@kardianos kardianos added this to the Release v1.1.0 milestone Mar 27, 2018
@kardianos
Copy link
Collaborator Author

Here is the current plan:

apd/v2 just merged in support for the decomposer interface. There is an open CL to help support scanning from the decomposer interface here.

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

No branches or pull requests

2 participants