joroKr21 opened a new issue, #10042:
URL: https://github.com/apache/arrow-datafusion/issues/10042
### Describe the bug
I didn't check in which version it regressed, but it worked in v34 and is
broken in v37.
It looks like the regression was caused by the specialization of the
`DistinctCount` implementation of `AggregateExpr`.
### To Reproduce
```sql
create table t_source
as values
('2018-11-13T17:11:10.011375885995', 'Row 0', 'X'),
('2011-12-13T11:13:10.12345', 'Row 1', 'X'),
(null, 'Row 2', 'Y'),
('2021-01-01T05:11:10.432', 'Row 3', 'Y');
create table t as
select
arrow_cast(column1, 'Timestamp(Second, Some("UTC"))') as secs_utc,
column2 as names,
column3 as tag
from t_source;
SELECT tag, count(DISTINCT secs_utc) FROM t GROUP BY tag ORDER BY tag;
```
### Expected behavior
It should work. The error we get is:
> External error: query failed: DataFusion error: External error: External
error: Arrow error: Invalid argument error: column types must match schema
types, expected List(Field { name: "item", data_type: Timestamp(Second,
Some("UTC")), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {}
}) but found List(Field { name: "item", data_type: Timestamp(Second, None),
nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) at column
index 1
### 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]