Closed as not planned
Description
there is some issue with UNION ALL and type derivation
> select avg(a) from (select -128.2::float a union all select 32768.3 union all select 27.3);
+--------------------+
| AVG(a) |
+--------------------+
| 10889.133334350587 |
+--------------------+
1 row(s) fetched.
Elapsed 0.011 seconds.
> select avg(a) from (select -128.2::float a union all select 32768.3::float union all select 27.3::float);
+-------------------+
| AVG(a) |
+-------------------+
| 10889.13359451294 |
+-------------------+
1 row(s) fetched.
Elapsed 0.011 seconds.
I expect those numbers to be the same. And that what duck db does
Originally posted by @comphead in #10634 (review)