You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"{adjust} * MIN(SQRT(AVG({value}*{value}) - AVG({value})*AVG({value})), (PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY {value}) - PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY {value})) / 1.34) * POW(COUNT(*), -0.2)",
0.9 * MIN(SQRT(AVG(x*x) - AVG(x)*AVG(x)), (PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY x) - PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY x)) / 1.34) * POW(COUNT(*), -0.2) AS bw
670
670
FROM (SELECT x FROM (VALUES (1.0), (2.0), (3.0), (4.0), (5.0)) AS t(x))
671
671
WHERE x IS NOT NULL
672
672
@@ -692,11 +692,11 @@ mod tests {
692
692
693
693
let bw_cte = density_sql_bandwidth(query,&groups,"x",¶meters);
694
694
695
-
// Verify exact SQL structure uses QUANTILE_CONT with GROUP BY
696
-
let expected = "WITH
695
+
// Verify exact SQL structure uses PERCENTILE_CONT with GROUP BY
0.9 * MIN(SQRT(AVG(x*x) - AVG(x)*AVG(x)), (PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY x) - PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY x)) / 1.34) * POW(COUNT(*), -0.2) AS bw,
700
700
region
701
701
FROM (SELECT x, region FROM (VALUES (1.0, 'A'), (2.0, 'A'), (3.0, 'B')) AS t(x, region))
0 commit comments