Dandandan opened a new issue, #11720: URL: https://github.com/apache/datafusion/issues/11720
### Describe the bug ```sql select APPROX_PERCENTILE_CONT(v, 0.5) FROM (VALUES (1), (2), (3), (NULL), (NULL), (NULL)) as t (v); +------------------------------------------+ | APPROX_PERCENTILE_CONT(t.v,Float64(0.5)) | +------------------------------------------+ | 0 | +------------------------------------------+ 1 row in set. Query took 0.002 seconds. ``` ### To Reproduce _No response_ ### Expected behavior Should return 2 (answer without nulls). Following PostgreSQL query also gives 2: ``` SELECT percentile_cont(0.5) WITHIN GROUP(order by v) FROM (VALUES (1), (2), (3), (NULL), (NULL), (NULL)) as t (v); ``` ### 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
