You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "erezrokah (via GitHub)" <gi...@apache.org> on 2023/06/06 15:56:10 UTC

[GitHub] [arrow] erezrokah opened a new pull request, #35950: GH-35948: [GO] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays

erezrokah opened a new pull request, #35950:
URL: https://github.com/apache/arrow/pull/35950

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### 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?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   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 
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #35950: GH-35948: [Go] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #35950:
URL: https://github.com/apache/arrow/pull/35950#issuecomment-1580567776

   Benchmark runs are scheduled for baseline = 105b9df0d504f25901cb89f49d365ec46b6de87b and contender = 745fa94f68f200d2a703b864d4b29ec8ee98a64d. 745fa94f68f200d2a703b864d4b29ec8ee98a64d is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/a0931803d5d54a71aac36401a55b1400...0bdc4b31480843b29a05cf0b564c6f34/)
   [Finished :arrow_down:2.04% :arrow_up:0.03%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/0d271d3f2c7c4c868e17056a95ada71e...838efe2ef7394be7b2a3b6ae64f20fb6/)
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/9fcfde8e2e27443e93939e74a9be1f6b...e3b862702c1b474182e8b8d4d32fbfd3/)
   [Failed :arrow_down:0.15% :arrow_up:0.06%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/78cb2217290e4fcdaba607c2ae16282d...06042ab908364773bdca759f9de2c30c/)
   Buildkite builds:
   [Finished] [`745fa94f` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2990)
   [Finished] [`745fa94f` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/3026)
   [Finished] [`745fa94f` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2991)
   [Failed] [`745fa94f` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/3016)
   [Finished] [`105b9df0` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2989)
   [Finished] [`105b9df0` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/3025)
   [Finished] [`105b9df0` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2990)
   [Failed] [`105b9df0` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/3015)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] erezrokah commented on pull request #35950: GH-35948: [Go] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays

Posted by "erezrokah (via GitHub)" <gi...@apache.org>.
erezrokah commented on PR #35950:
URL: https://github.com/apache/arrow/pull/35950#issuecomment-1579105250

   Thanks for the quick review and merge!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade merged pull request #35950: GH-35948: [Go] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #35950:
URL: https://github.com/apache/arrow/pull/35950


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] erezrokah commented on pull request #35950: GH-35948: [Go] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays

Posted by "erezrokah (via GitHub)" <gi...@apache.org>.
erezrokah commented on PR #35950:
URL: https://github.com/apache/arrow/pull/35950#issuecomment-1579087762

   Not sure if the failing test is related to flaky, help appreciated 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade commented on pull request #35950: GH-35948: [Go] Only cast `int8` and `unit8` to `float64` when JSON marshaling arrays

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on PR #35950:
URL: https://github.com/apache/arrow/pull/35950#issuecomment-1579090504

   @erezrokah The failing test is indeed a flaky test, I haven't yet been able to reproduce it locally in order to fix it which annoys me. But you're fine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org