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 }}
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: tests/unit/core/compile/sqlglot/snapshots/test_compile_window/test_compile_window_w_groupby_rolling/out.sql
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,13 @@ WITH `bfcte_0` AS (
22
22
SELECT
23
23
*,
24
24
CASE
25
-
WHEN SUM(CAST(NOT `bfcol_7` IS NULLAS INT64)) OVER (
26
-
PARTITION BY `bfcol_9`
27
-
ORDER BY`bfcol_9`ASC NULLS LAST, `rowindex`ASC NULLS LAST
28
-
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
25
+
WHEN COALESCE(
26
+
SUM(CAST(NOT `bfcol_7` IS NULLAS INT64)) OVER (
27
+
PARTITION BY `bfcol_9`
28
+
ORDER BY`bfcol_9`ASC NULLS LAST, `rowindex`ASC NULLS LAST
29
+
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
30
+
),
31
+
0
29
32
) <3
30
33
THEN NULL
31
34
ELSE COALESCE(
@@ -42,10 +45,13 @@ WITH `bfcte_0` AS (
42
45
SELECT
43
46
*,
44
47
CASE
45
-
WHEN SUM(CAST(NOT `bfcol_8` IS NULLAS INT64)) OVER (
46
-
PARTITION BY `bfcol_9`
47
-
ORDER BY`bfcol_9`ASC NULLS LAST, `rowindex`ASC NULLS LAST
48
-
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
48
+
WHEN COALESCE(
49
+
SUM(CAST(NOT `bfcol_8` IS NULLAS INT64)) OVER (
50
+
PARTITION BY `bfcol_9`
51
+
ORDER BY`bfcol_9`ASC NULLS LAST, `rowindex`ASC NULLS LAST
0 commit comments