Commits


Erez Rokah authored and GitHub committed 745fa94f68f
GH-35948: [Go] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays (#35950) ### Rationale for this change See [issue](https://github.com/apache/arrow/issues/35948). Based on https://github.com/apache/arrow/blob/9fb8697dcb442f63317c7d6046393fb74842e0ae/go/arrow/array/numeric.gen.go.tmpl#L120 it seems we should only do the casting for `unit8` and `int8` types. ### What changes are included in this PR? This PR fixes the numeric template so it only casts `int8` and `unit8` to `float64` when JSON marshaling arrays to avoid losing data for other types. ### Are these changes tested? Yes ### Are there any user-facing changes? The user facing change is that if a user was JSON marshaling arrays that has `uint64` or `int64` values they can now get different (more accurate) values than before * Closes: #35948 Authored-by: erezrokah <erezrokah@users.noreply.github.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>