Shahzeb-DataEngineer commented on issue #26648: URL: https://github.com/apache/datafusion/issues/26648#issuecomment-6362443348
Thanks Adam. The PR (#26652) already takes the avg route for decimals: checked accumulation that errors with Arithmetic Overflow in SumAccumulator, plus the precision bound. Integers are intentionally untouched since their wrapping is documented. The inconsistency I was aiming at is within decimal itself: scalar add and multiply error on overflow, avg errors, only sum wraps, and it can return a value outside its declared precision (39 digits for a Decimal(38,0) in the repro). Happy to adjust the approach if you see a better shape for it. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
