AdamGS opened a new issue, #24369:
URL: https://github.com/apache/datafusion/issues/24369

   ### Describe the bug
   
   The return type for `avg(decimal)` is currently `Decimal(p + 4, s + 4)`, 
saturating at the width's max size. 
   For columns that have a precision that is close to the variant's maximum 
precision, the output might not fit into the return type, resulting in an 
overflow.
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   Averages shouldn't overflow at that last step, especially as this is a 
predictable output.
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to