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

Parse integers to ints, not float64 #16

Open
trzysiek opened this issue Feb 16, 2024 · 0 comments
Open

Parse integers to ints, not float64 #16

trzysiek opened this issue Feb 16, 2024 · 0 comments

Comments

@trzysiek
Copy link
Member

trzysiek commented Feb 16, 2024

Standard JSON unmarshaller parses any number to float64, which causes precision errors when dealing with big integers, but still fitting into 64 bits.

One example is when we receive a JSON insert with 2^54 in it, we'll pass it to Clickhouse with some other value, which seems pretty unacceptable on production. (We have commented out test for that, look https://github.com/QuesmaOrg/poc-elk-mitmproxy/pull/269 )

It would probably also be good to check/grep other places in code, as we're using the standard unmarshaller in more than one place.

@trzysiek trzysiek changed the title Parse integers as integers, not float64 Parse integers to ints, not float64 Feb 16, 2024
@pivovarit pivovarit transferred this issue from another repository May 2, 2024
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

1 participant