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

   ### Describe the bug
   
   When the partial aggregate skipping logic added in 
https://github.com/apache/datafusion/pull/11627 is invoked for decimal values 
it generates an error like
   
   > query error DataFusion error: External error: Arrow error: Invalid 
argument error: column types must match schema types, expected Decimal128\(20, 
3\) but found Decimal128\(38, 10\) at column index 1
   
   
   ### To Reproduce
   
   Add this to the end of 
datafusion/sqllogictest/test_files/aggregate_skip_partial.slt
   
   ```
   statement ok
   DROP TABLE aggregate_test_100_null;
   
   # Test for aggregate functions with different intermediate types
   # Need more than 10 values to trigger skipping
   statement ok
   CREATE TABLE decimal_table(i int, d decimal(10,3)) as
   VALUES (1, 1.1), (2, 2.2), (3, 3.3), (2, 4.4), (1, 5.5);
   
   statement ok
   CREATE TABLE t(id int) as values (1), (2), (3), (4), (5), (6), (7), (8), 
(9), (10);
   
   query error DataFusion error: External error: Arrow error: Invalid argument 
error: column types must match schema types, expected Decimal128\(20, 3\) but 
found Decimal128\(38, 10\) at column index 1
   SELECT i, sum(d)
   FROM decimal_table CROSS JOIN t
   GROUP BY i
   ORDER BY i;
   
   statement ok
   DROP TABLE decimal_table;
   
   ```
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   I found this while testing 


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