neilconway opened a new pull request, #10873: URL: https://github.com/apache/arrow-rs/pull/10873
# Which issue does this PR close? - Closes #10872. # Rationale for this change The Decimal256 branch of `array_from_json` didn't handle zeros correctly. It builds a little-endian two's-complement buffer as part of converting string-valued decimals into native Decimal256 values, but for `0` inputs exactly, it used the wrong fill bytes (it used `0xFF` instead of `0`). This lead to `0` being decoded as `-256`. # What changes are included in this PR? * Fix decoding bug (use `0` fill bytes for `0` input values) * Add unit test # Are these changes tested? Yes, new test added. # Are there any user-facing changes? No. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
