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
{{ message }}
Repository navigation
Sliding window execution fails for covar_pop, covar_samp, and corr #22763
Bounded sliding window queries using covar_pop, covar_samp, and corr fail with a "retract_batch is not implemented" error, even though these aggregates otherwise work correctly.
To Reproduce
CREATETABLEsliding_corr_testASVALUES
(1, 10.0),
(2, 20.0),
(3, 30.0);
SELECT
column1,
covar_pop(column2, column2) OVER (
ORDER BY column1
ROWS BETWEEN 1 PRECEDING AND1 PRECEDING
) AS cp,
covar_samp(column2, column2) OVER (
ORDER BY column1
ROWS BETWEEN 1 PRECEDING AND1 PRECEDING
) AS cs,
corr(column2, column2) OVER (
ORDER BY column1
ROWS BETWEEN 1 PRECEDING AND1 PRECEDING
) AS c
FROM sliding_corr_test;
Expected behavior
The query should execute successfully and return covariance/correlation values for the specified window frame, similar to how other aggregates that support bounded sliding windows behave.
Actual Result
This feature is not implemented: Aggregate can not be used as a sliding accumulator because `retract_batch` is not implemented: covar_pop(sliding_corr_test.column2, sliding_corr_test.column2) ORDER BY [sliding_corr_test.column1 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING
The same error occurs for other bounded sliding frames, for example:
Activity
fix: Enable sliding window execution for covar_pop, covar_samp, and c…
fix: Enable sliding window execution for covar_pop, covar_samp, and c…
fix: Enable sliding window execution for covar_pop, covar_samp, and c…
fix: Enable sliding window execution for covar_pop, covar_samp, and c…
fix: Enable sliding window execution for covar_pop, covar_samp, and c…