scovich opened a new issue, #8579: URL: https://github.com/apache/arrow-rs/issues/8579
**Describe the bug** Today, attempting to converting from e.g. `Decimal32(9, 3)` to `Decimal32(9, -7)` fails with an "overflow" error. The overflow in question is computing `pow(10, 3 - (-7))` which indeed overflows 32-bit int. But that overflow is an implementation detail -- the result of the conversion is perfectly well-defined: `value/10000000000` rounds to zero, for all possible unscaled decimal32 values. **To Reproduce** Try to convert `Decimal32(9, 3)` to `Decimal32(9, -7)` **Expected behavior** The cast should succeed and produce a column of all-zeros values. **Additional context** Discovered by code inspection, as part of reviewing https://github.com/apache/arrow-rs/pull/8552 -- 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]
