Skip to content

Conversation

@loicalleyne
Copy link
Contributor

Rationale for this change

Addresses #474

What changes are included in this PR?

Replaced strconv.ParseInt/strconv.ParseUint with strconv.ParseFloat in Int64/Uint64Builder.UnmarshalOne

Are these changes tested?

Existing tests pass.

Are there any user-facing changes?

No

@loicalleyne loicalleyne requested a review from zeroshade as a code owner August 15, 2025 15:55
@zeroshade
Copy link
Member

Do we need to do this for ALL the integer types? not just int64/uint64?

Can you add a relevant test case for this please?

@Dhruvit96
Copy link
Contributor

FWIW, while exploring issues and PRs, I noticed that using ParseFloat isn’t the right solution. The problem is that it loses precision for integers larger than 2^53 (for example, "9007199254740993" gets converted to 9.007199254740993e+15).
ref: https://go.dev/play/p/DHzSTvI07iE

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

Successfully merging this pull request may close these issues.

3 participants