liukun4515 commented on code in PR #6939:
URL: https://github.com/apache/arrow-datafusion/pull/6939#discussion_r1262381101


##########
datafusion/core/tests/sqllogictests/test_files/aggregate.slt:
##########
@@ -1710,13 +1854,25 @@ select sum(c1), arrow_typeof(sum(c1)) from d_table;
 ----
 100 Decimal128(20, 3)
 
+query TRT
+select c2, sum(c1), arrow_typeof(sum(c1)) from d_table GROUP BY c2 ORDER BY c2;
+----
+A 1100.045 Decimal128(20, 3)

Review Comment:
   The data type of `c1` is `c1 decimal(10,3)`
   the result of `sum(c1)` is `decimal(10+10,3)`, this align with spark rule: 
`the new precision = old precision + 10`



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