GH-35310: [Go] Incorrect value decimal128 from string#35311
Conversation
|
|
lidavidm
left a comment
There was a problem hiding this comment.
Can we also add a test with a negative value?
|
@lidavidm added same test but with negative version of the number |
|
Benchmark runs are scheduled for baseline = 5de5692 and contender = 966a804. 966a804 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
…5311) ### Rationale for this change Fix edge case of rounding when parsing a decimal128 value from string with a high precision. ### What changes are included in this PR? Adding a simple 0.5 rounding based on the signbit before we truncate the value to an integer. ### Are these changes tested? Yes, an edge case test case was added. ### Are there any user-facing changes? Some values that were previously incorrect will now be correct. * Closes: apache#35310 Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
…5311) ### Rationale for this change Fix edge case of rounding when parsing a decimal128 value from string with a high precision. ### What changes are included in this PR? Adding a simple 0.5 rounding based on the signbit before we truncate the value to an integer. ### Are these changes tested? Yes, an edge case test case was added. ### Are there any user-facing changes? Some values that were previously incorrect will now be correct. * Closes: apache#35310 Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Rationale for this change
Fix edge case of rounding when parsing a decimal128 value from string with a high precision.
What changes are included in this PR?
Adding a simple 0.5 rounding based on the signbit before we truncate the value to an integer.
Are these changes tested?
Yes, an edge case test case was added.
Are there any user-facing changes?
Some values that were previously incorrect will now be correct.