[MDEV-17696] percentile_cont and percentile_disc don't work Created: 2018-11-13  Updated: 2018-11-20  Resolved: 2018-11-20

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.3.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Chris Wilson Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://mariadb.com/kb/en/library/percentile_disc/ & https://mariadb.com/kb/en/library/percentile_cont/ both state that these functions are:

"is an ordered set aggregate function which can also be used as a window function"

... however it doesn't appear to be possible to use them as ordered set aggregate functions. If one attempts a query "percentile_cont(fraction) WITHIN GROUP (ORDER BY sort_expression)" without an OVER clause then a "You have an error in your SQL syntax" is returned.

I suspect this might get classified as a documentation error (ie they're only supported as window functions) - however MDEV-12985 did clearly consider both use-cases.



 Comments   
Comment by Alice Sherepa [ 2018-11-13 ]

Thank you for pointing it out, yes, currently it is not supported and documentation is not reflecting it. These functions work only as window functions in MariaDB.

Generated at Thu Feb 08 08:38:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.