For the databases that support the PERCENTILE_CONT() window function, I don't see how we can use this in aggregation (i.e. summarise()) context.
The SQL server docs seem to be the only place that addresses this problem and suggests using DISTINCT:
SELECT DISTINCT DepartmentName
,PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY BaseRate)
OVER (PARTITION BY DepartmentName) AS MedianCont
,PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY BaseRate)
OVER (PARTITION BY DepartmentName) AS MedianDisc
So maybe the best we can do is supply translations for those as window functions, and then suggest the user use distinct()?