comphead commented on code in PR #5739:
URL: https://github.com/apache/arrow-datafusion/pull/5739#discussion_r1148396626


##########
datafusion/core/tests/sqllogictests/test_files/aggregate.slt:
##########
@@ -1524,3 +1524,17 @@ NULL
 
 query error DataFusion error: Execution error: aggregate function needs at 
least one non-null element
 select approx_median(a) from (select 1 as a where 1=0);
+
+
+# aggregate_decimal_sum
+query RT
+select sum(c1), arrow_typeof(sum(c1)) from d_table;
+----
+100 Decimal128(20, 3)
+
+
+# aggregate_decimal_avg
+query RT
+select avg(c1), arrow_typeof(avg(c1)) from d_table

Review Comment:
   looks good, just wondering why `arrow_typeof(sum(c1) == Decimal128(20, 3)`
   `arrow_typeof(avg(c1)) == Decimal128(14, 7)`
   
   is the data type size gets adjusted automatically?



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