Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 90b8a5b

Browse files
update snapshots
1 parent 873d045 commit 90b8a5b

File tree

7 files changed

+48
-16
lines changed
  • tests/unit/core/compile/sqlglot
    • aggregations/snapshots/test_unary_compiler/test_qcut
    • expressions/snapshots/test_generic_ops
    • snapshots/test_compile_window
      • test_compile_window_w_groupby_rolling
      • test_compile_window_w_range_rolling
      • test_compile_window_w_skips_nulls_op
      • test_compile_window_wo_skips_nulls_op

7 files changed

+48
-16
lines changed

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_qcut/out.sql

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,47 @@ SELECT
22
`rowindex`,
33
`int64_col`,
44
IF(
5-
NOT `int64_col` IS NULL,
5+
NOT (
6+
`int64_col`
7+
) IS NULL,
68
IF(
79
`int64_col` IS NULL,
810
NULL,
911
CAST(GREATEST(
1012
CEIL(
11-
PERCENT_RANK() OVER (PARTITION BY NOT `int64_col` IS NULL ORDER BY `int64_col` ASC) * 4
13+
PERCENT_RANK() OVER (PARTITION BY NOT (
14+
`int64_col`
15+
) IS NULL ORDER BY `int64_col` ASC) * 4
1216
) - 1,
1317
0
1418
) AS INT64)
1519
),
1620
NULL
1721
) AS `qcut_w_int`,
1822
IF(
19-
NOT `int64_col` IS NULL,
23+
NOT (
24+
`int64_col`
25+
) IS NULL,
2026
CASE
21-
WHEN PERCENT_RANK() OVER (PARTITION BY NOT `int64_col` IS NULL ORDER BY `int64_col` ASC) < 0
27+
WHEN PERCENT_RANK() OVER (PARTITION BY NOT (
28+
`int64_col`
29+
) IS NULL ORDER BY `int64_col` ASC) < 0
2230
THEN NULL
23-
WHEN PERCENT_RANK() OVER (PARTITION BY NOT `int64_col` IS NULL ORDER BY `int64_col` ASC) <= 0.25
31+
WHEN PERCENT_RANK() OVER (PARTITION BY NOT (
32+
`int64_col`
33+
) IS NULL ORDER BY `int64_col` ASC) <= 0.25
2434
THEN 0
25-
WHEN PERCENT_RANK() OVER (PARTITION BY NOT `int64_col` IS NULL ORDER BY `int64_col` ASC) <= 0.5
35+
WHEN PERCENT_RANK() OVER (PARTITION BY NOT (
36+
`int64_col`
37+
) IS NULL ORDER BY `int64_col` ASC) <= 0.5
2638
THEN 1
27-
WHEN PERCENT_RANK() OVER (PARTITION BY NOT `int64_col` IS NULL ORDER BY `int64_col` ASC) <= 0.75
39+
WHEN PERCENT_RANK() OVER (PARTITION BY NOT (
40+
`int64_col`
41+
) IS NULL ORDER BY `int64_col` ASC) <= 0.75
2842
THEN 2
29-
WHEN PERCENT_RANK() OVER (PARTITION BY NOT `int64_col` IS NULL ORDER BY `int64_col` ASC) <= 1
43+
WHEN PERCENT_RANK() OVER (PARTITION BY NOT (
44+
`int64_col`
45+
) IS NULL ORDER BY `int64_col` ASC) <= 1
3046
THEN 3
3147
ELSE NULL
3248
END,
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
SELECT
2-
`float64_col` IS NULL AS `float64_col`
2+
(
3+
`float64_col`
4+
) IS NULL AS `float64_col`
35
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
SELECT
2-
NOT `float64_col` IS NULL AS `float64_col`
2+
NOT (
3+
`float64_col`
4+
) IS NULL AS `float64_col`
35
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ SELECT
33
`rowindex`,
44
CASE
55
WHEN COALESCE(
6-
SUM(CAST(NOT `bool_col` IS NULL AS INT64)) OVER (
6+
SUM(CAST(NOT (
7+
`bool_col`
8+
) IS NULL AS INT64)) OVER (
79
PARTITION BY `bool_col`
810
ORDER BY `bool_col` ASC NULLS LAST, `rowindex` ASC NULLS LAST
911
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
@@ -23,7 +25,9 @@ SELECT
2325
END AS `bool_col_1`,
2426
CASE
2527
WHEN COALESCE(
26-
SUM(CAST(NOT `int64_col` IS NULL AS INT64)) OVER (
28+
SUM(CAST(NOT (
29+
`int64_col`
30+
) IS NULL AS INT64)) OVER (
2731
PARTITION BY `bool_col`
2832
ORDER BY `bool_col` ASC NULLS LAST, `rowindex` ASC NULLS LAST
2933
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
@@ -43,7 +47,9 @@ SELECT
4347
END AS `int64_col`
4448
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
4549
WHERE
46-
NOT `bool_col` IS NULL
50+
NOT (
51+
`bool_col`
52+
) IS NULL
4753
ORDER BY
4854
`bool_col` ASC NULLS LAST,
4955
`rowindex` ASC NULLS LAST

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ SELECT
77
`bfcol_0` AS `ts_col`,
88
CASE
99
WHEN COALESCE(
10-
SUM(CAST(NOT `bfcol_1` IS NULL AS INT64)) OVER (
10+
SUM(CAST(NOT (
11+
`bfcol_1`
12+
) IS NULL AS INT64)) OVER (
1113
ORDER BY UNIX_MICROS(`bfcol_0`) ASC
1214
RANGE BETWEEN 2999999 PRECEDING AND CURRENT ROW
1315
),

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ SELECT
22
`rowindex`,
33
CASE
44
WHEN COALESCE(
5-
SUM(CAST(NOT `int64_col` IS NULL AS INT64)) OVER (ORDER BY `rowindex` ASC NULLS LAST ROWS BETWEEN 2 PRECEDING AND CURRENT ROW),
5+
SUM(CAST(NOT (
6+
`int64_col`
7+
) IS NULL AS INT64)) OVER (ORDER BY `rowindex` ASC NULLS LAST ROWS BETWEEN 2 PRECEDING AND CURRENT ROW),
68
0
79
) < 3
810
THEN NULL

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
SELECT
22
`rowindex`,
33
CASE
4-
WHEN COUNT(NOT `int64_col` IS NULL) OVER (ORDER BY `rowindex` ASC NULLS LAST ROWS BETWEEN 4 PRECEDING AND CURRENT ROW) < 5
4+
WHEN COUNT(NOT (
5+
`int64_col`
6+
) IS NULL) OVER (ORDER BY `rowindex` ASC NULLS LAST ROWS BETWEEN 4 PRECEDING AND CURRENT ROW) < 5
57
THEN NULL
68
WHEN TRUE
79
THEN COUNT(`int64_col`) OVER (ORDER BY `rowindex` ASC NULLS LAST ROWS BETWEEN 4 PRECEDING AND CURRENT ROW)

0 commit comments

Comments
 (0)