Skip to content

[Go] The numeric array MarshalJSON implementation always converts values to float64, missing precision #41156

Closed as not planned

Description

@candiduslynx

Describe the bug, including details regarding any error messages, version, and platform.

int64(-5474557666971701248) won't be correctly represented via MarshalJSON as the value is first converted to float64. See this gen line:

{{ if (eq .Size "1") }}vals[i] = float64(a.values[i]) // prevent uint8 from being seen as binary data{{ else }}vals[i] = a.values[i]{{ end }}

This is present since v12 at least.
It would be great to get this both fixed & maybe backported.

Component(s)

Go

Activity

  1. candiduslynx commented on Apr 11, 2024

    @candiduslynx
    ContributorAuthor

    Actually, it seems the dup of #35948, but it'd be great to be able to have this backported.
    @zeroshade is there any process to do so?

  2. zeroshade commented on Apr 11, 2024

    @zeroshade
    Member

    @candiduslynx #35948 was released in v13, do you truly need it backported to v12 instead of being able to upgrade to v13 or newer?

    There is a process for releasing patch fixes, so if necessary we can release a v12.0.2 containing a backport, I would just prefer to avoid doing so if you could upgrade to v13 or newer which has the fix already

  3. candiduslynx commented on Apr 11, 2024

    @candiduslynx
    ContributorAuthor

    Unfortunately, yes:

    @candiduslynx #35948 was released in v13, do you truly need it backported to v12 instead of being able to upgrade to v13 or newer?

    There is a process for releasing patch fixes, so if necessary we can release a v12.0.2 containing a backport, I would just prefer to avoid doing so if you could upgrade to v13 or newer which has the fix already

    @zeroshade we're using v15 in our mainline, but the driver we need uses v12: https://github.com/databricks/databricks-sql-go/blob/main/go.mod#L6

    So, it'll have to be any of the following options:

    If backporting isn't too much of a hassle, it'd be super-great!

  4. zeroshade commented on Apr 11, 2024

    @zeroshade
    Member

    I'll set up the branch and PR and toss an email on the arrow dev mailing list. Unfortunately we'll still need to follow ASF protocols, so a vote on the RC would need to happen even if it's only for Go

  5. candiduslynx commented on Apr 11, 2024

    @candiduslynx
    ContributorAuthor

    I'll set up the branch and PR and toss an email on the arrow dev mailing list. Unfortunately we'll still need to follow ASF protocols, so a vote on the RC would need to happen even if it's only for Go

    Thank you!

  6. zeroshade commented on Apr 11, 2024

    @zeroshade
    Member

    I've created #41157 to perform the backport. I spoke with @assignUser and we think that this could be a great case study scenario to test the individual component releases that were being discussed at the last community meeting.

    @candiduslynx how urgent is this backport for you?

  7. changed the title [-]The numeric array `MarshalJSON` implementation always converts values to `float64`, missing precision[/-] [+][Go] The numeric array `MarshalJSON` implementation always converts values to `float64`, missing precision[/+] on Apr 12, 2024
  8. candiduslynx commented on Apr 12, 2024

    @candiduslynx
    ContributorAuthor

    @candiduslynx how urgent is this backport for you?

    @zeroshade it would be great to get this ported sooner rather than later. We can wait for a week, though.

  9. assignUser commented on Jul 18, 2024

    @assignUser
    Member

    We could not get the backport release to work without considerable effort. There are now plans to improve the over all process to make things like this easier. I am closing this seems to have been fixed on databricks side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions