pitrou commented on PR #44184: URL: https://github.com/apache/arrow/pull/44184#issuecomment-2415122098
> Two problems with just validating afterward: First, I'd expect in reasonable cases for the validation to fail. A sum of 1m decimals of approximately the same size you'd expect to have 6 more digits of precision. It depends obviously if all decimals are of the same sign, and what their actual magnitude is. > Second, just checking for overflow doesn't solve the underlying problem. In the example above, I used a `validate` call simply to show that the result was indeed erroneous. I didn't mean we should actually call validation afterwards. We should instead check for overflow at each individual aggregation step (for each add or multiply, for example). This is required _even_ if we were to bump the result's precision to the max. -- 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]
