Skip to content

Commit 3621998

Browse files
update snapshots
1 parent 8b402b3 commit 3621998

File tree

1 file changed

+5
-31
lines changed
  • tests/unit/core/compile/sqlglot/snapshots/test_compile_window/test_compile_window_w_groupby_rolling

1 file changed

+5
-31
lines changed

tests/unit/core/compile/sqlglot/snapshots/test_compile_window/test_compile_window_w_groupby_rolling/out.sql

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,13 @@ WITH `bfcte_0` AS (
1212
`int64_col` AS `bfcol_8`,
1313
`bool_col` AS `bfcol_9`
1414
FROM `bfcte_0`
15-
), `bfcte_2` AS (
15+
), `bfcte_3` AS (
1616
SELECT
1717
*
1818
FROM `bfcte_1`
1919
WHERE
2020
NOT `bfcol_9` IS NULL
21-
), `bfcte_3` AS (
22-
SELECT
23-
*,
24-
CASE
25-
WHEN SUM(CAST(NOT `bfcol_7` IS NULL AS 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
29-
) < 3
30-
THEN NULL
31-
ELSE COALESCE(
32-
SUM(CAST(`bfcol_7` AS INT64)) OVER (
33-
PARTITION BY `bfcol_9`
34-
ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST
35-
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
36-
),
37-
0
38-
)
39-
END AS `bfcol_15`
40-
FROM `bfcte_2`
4121
), `bfcte_4` AS (
42-
SELECT
43-
*
44-
FROM `bfcte_3`
45-
WHERE
46-
NOT `bfcol_9` IS NULL
47-
), `bfcte_5` AS (
4822
SELECT
4923
*,
5024
CASE
@@ -62,15 +36,15 @@ WITH `bfcte_0` AS (
6236
),
6337
0
6438
)
65-
END AS `bfcol_21`
66-
FROM `bfcte_4`
39+
END AS `bfcol_16`
40+
FROM `bfcte_3`
6741
)
6842
SELECT
6943
`bfcol_9` AS `bool_col`,
7044
`bfcol_6` AS `rowindex`,
7145
`bfcol_15` AS `bool_col_1`,
72-
`bfcol_21` AS `int64_col`
73-
FROM `bfcte_5`
46+
`bfcol_16` AS `int64_col`
47+
FROM `bfcte_4`
7448
ORDER BY
7549
`bfcol_9` ASC NULLS LAST,
7650
`rowindex` ASC NULLS LAST

0 commit comments

Comments
 (0)