alamb commented on PR #21988:
URL: https://github.com/apache/datafusion/pull/21988#issuecomment-4373442428
I spot checked duckdb and postgres and agree with your analysis.
```sql
memory D create table foo(x int);
memory D insert into foo values (1), (2), (1), (3), (1);
memory D select median(x) from foo;
┌───────────┐
│ median(x) │
│ double │
├───────────┤
│ 1.0 │
└───────────┘
```
```sql
postgres=# select percentile_cont(0.5) WITHIN GROUP (ORDER BY x) from foo;
percentile_cont
-----------------
1
(1 row)
postgres=# select pg_typeof(percentile_cont(0.5) WITHIN GROUP (ORDER BY x))
from foo;
pg_typeof
------------------
double precision
(1 row)
```
--
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]