createcentury commented on PR #53327: URL: https://github.com/apache/arrow/pull/53327#issuecomment-6561881283
@pitrou would you have time to take a look at this one? Short version: `DecimalConversions<Decimal32, InDecimal>` narrowed the coefficient to 32 bits in `ConvertInput`, before `SafeRescaleDecimal` ran `Rescale` and `FitsInPrecision` on it. Every other narrowing specialization keeps the source width until `ConvertOutput`, so this was the only path where the range check looked at an already-wrapped value — casting `5000000000` to `decimal32(9, 0)` returned `705032704` with overflow checking enabled. The fix gives the specialization the same shape as the Decimal64 one, 8 lines, and the helper is only used inside `scalar_cast_numeric.cc`. The one red check, `rhub/ubuntu-gcc12:latest`, was cancelled rather than failed — no failed step is recorded, and the other three jobs in that same R run passed. The remaining 42 checks are green. dmitry-chirkov-dremio approved it on Oct 16. -- 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]
