jayzhan211 commented on issue #24461:
URL: https://github.com/apache/datafusion/issues/24461#issuecomment-6383699099
I'd like #26211 in 56.0.0. It fixes a regression on `main`: this query works
on 55.0.0 and fails on `main`.
```sql
create table s (g varchar, k varchar, x decimal(18,6)) as values ('a', 'u1',
1.5), ('a', 'u2', 2.5), ('b', 'u1', 3.0);
select g, nullif(sum(x), 0) as s, count(*) as n, count(distinct k) as d from
s group by g order by g;
```
```text
Arrow error: Invalid argument error: Invalid comparison operation:
Decimal128(38, 6) == Decimal128(28, 6)
```
It starts failing at #24859, which lets `SingleDistinctToGroupBy` rewrite an
aggregate with a `count(*)` next to the distinct aggregate, and so exposes the
rule's decimal type bug (#26193). With #26211 it returns the same rows as
55.0.0. Query q158 of the dbolympics benchmark (#26661) fails the same way.
--
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]