liukun4515 commented on pull request #1408:
URL: https://github.com/apache/arrow-datafusion/pull/1408#issuecomment-994243149


   In the comments, @alamb gives some comments about the precision or scale for 
the result data type. 
   I want to follow the guidance document 
https://www.postgresql.org/docs/8.2/functions-aggregate.html at first but can't 
find some useful suggestions.
   So I follow the behavior in the spark 
[sun](https://github.com/apache/spark/blob/c75186cd111b91d13e32159169334d562bdeb767/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Sum.scala#L66)
 and 
[avg](https://github.com/apache/spark/blob/c75186cd111b91d13e32159169334d562bdeb767/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala#L66).


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


Reply via email to