Skip to content

Commit 1eb20bb

Browse files
update snapshot tests
1 parent 60c0ba9 commit 1eb20bb

File tree

17 files changed

+23
-63
lines changed

17 files changed

+23
-63
lines changed

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_all/window_out.sql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
CASE
9-
WHEN `bool_col` IS NULL
10-
THEN NULL
11-
ELSE COALESCE(LOGICAL_AND(`bool_col`) OVER (), TRUE)
12-
END AS `bfcol_1`
8+
COALESCE(LOGICAL_AND(`bool_col`) OVER (), TRUE) AS `bfcol_1`
139
FROM `bfcte_0`
1410
)
1511
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_all/window_partition_out.sql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ WITH `bfcte_0` AS (
66
), `bfcte_1` AS (
77
SELECT
88
*,
9-
CASE
10-
WHEN `bool_col` IS NULL
11-
THEN NULL
12-
ELSE COALESCE(LOGICAL_AND(`bool_col`) OVER (PARTITION BY `string_col`), TRUE)
13-
END AS `bfcol_2`
9+
COALESCE(LOGICAL_AND(`bool_col`) OVER (PARTITION BY `string_col`), TRUE) AS `bfcol_2`
1410
FROM `bfcte_0`
1511
)
1612
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_any_value/window_out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
CASE WHEN `int64_col` IS NULL THEN NULL ELSE ANY_VALUE(`int64_col`) OVER () END AS `bfcol_1`
8+
ANY_VALUE(`int64_col`) OVER () AS `bfcol_1`
99
FROM `bfcte_0`
1010
)
1111
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_any_value/window_partition_out.sql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ WITH `bfcte_0` AS (
66
), `bfcte_1` AS (
77
SELECT
88
*,
9-
CASE
10-
WHEN `int64_col` IS NULL
11-
THEN NULL
12-
ELSE ANY_VALUE(`int64_col`) OVER (PARTITION BY `string_col`)
13-
END AS `bfcol_2`
9+
ANY_VALUE(`int64_col`) OVER (PARTITION BY `string_col`) AS `bfcol_2`
1410
FROM `bfcte_0`
1511
)
1612
SELECT

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
CASE
9-
WHEN `int64_col` IS NULL
10-
THEN NULL
11-
ELSE FIRST_VALUE(`int64_col`) OVER (
12-
ORDER BY `int64_col` DESC
13-
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
14-
)
15-
END AS `bfcol_1`
8+
FIRST_VALUE(`int64_col`) OVER (
9+
ORDER BY `int64_col` DESC
10+
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
11+
) AS `bfcol_1`
1612
FROM `bfcte_0`
1713
)
1814
SELECT

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
CASE
9-
WHEN `int64_col` IS NULL
10-
THEN NULL
11-
ELSE LAST_VALUE(`int64_col`) OVER (
12-
ORDER BY `int64_col` DESC
13-
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
14-
)
15-
END AS `bfcol_1`
8+
LAST_VALUE(`int64_col`) OVER (
9+
ORDER BY `int64_col` DESC
10+
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
11+
) AS `bfcol_1`
1612
FROM `bfcte_0`
1713
)
1814
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_max/window_out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
CASE WHEN `int64_col` IS NULL THEN NULL ELSE MAX(`int64_col`) OVER () END AS `bfcol_1`
8+
MAX(`int64_col`) OVER () AS `bfcol_1`
99
FROM `bfcte_0`
1010
)
1111
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_max/window_partition_out.sql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ WITH `bfcte_0` AS (
66
), `bfcte_1` AS (
77
SELECT
88
*,
9-
CASE
10-
WHEN `int64_col` IS NULL
11-
THEN NULL
12-
ELSE MAX(`int64_col`) OVER (PARTITION BY `string_col`)
13-
END AS `bfcol_2`
9+
MAX(`int64_col`) OVER (PARTITION BY `string_col`) AS `bfcol_2`
1410
FROM `bfcte_0`
1511
)
1612
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_mean/window_out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
CASE WHEN `int64_col` IS NULL THEN NULL ELSE AVG(`int64_col`) OVER () END AS `bfcol_1`
8+
AVG(`int64_col`) OVER () AS `bfcol_1`
99
FROM `bfcte_0`
1010
)
1111
SELECT

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_unary_compiler/test_mean/window_partition_out.sql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ WITH `bfcte_0` AS (
66
), `bfcte_1` AS (
77
SELECT
88
*,
9-
CASE
10-
WHEN `int64_col` IS NULL
11-
THEN NULL
12-
ELSE AVG(`int64_col`) OVER (PARTITION BY `string_col`)
13-
END AS `bfcol_2`
9+
AVG(`int64_col`) OVER (PARTITION BY `string_col`) AS `bfcol_2`
1410
FROM `bfcte_0`
1511
)
1612
SELECT

0 commit comments

Comments
 (0)