Skip to content

Commit 993ea75

Browse files
update new snapshots
1 parent 6b08718 commit 993ea75

File tree

11 files changed

+25
-62
lines changed
  • tests/unit/core/compile/sqlglot
    • aggregations/snapshots
    • expressions/snapshots
    • snapshots
      • test_compile_isin/test_compile_isin_not_nullable
      • test_compile_window
        • test_compile_window_w_groupby_rolling
        • test_compile_window_w_range_rolling

11 files changed

+25
-62
lines changed

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_ordered_unary_compiler/test_string_agg/out.sql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
COALESCE(
8-
STRING_AGG(`string_col`, ','
9-
ORDER BY
10-
`string_col` IS NULL ASC,
11-
`string_col` ASC),
8+
STRING_AGG(`string_col` ORDER BY `string_col` IS NULL ASC, `string_col` ASC, ','),
129
''
1310
) AS `bfcol_1`
1411
FROM `bfcte_0`

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ WITH `bfcte_0` AS (
88
CASE
99
WHEN `int64_col` IS NULL
1010
THEN NULL
11-
ELSE FIRST_VALUE(`int64_col`) OVER (
12-
ORDER BY `int64_col` DESC
13-
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
14-
)
11+
ELSE FIRST_VALUE(`int64_col`) OVER (ORDER BY `int64_col` DESC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
1512
END AS `bfcol_1`
1613
FROM `bfcte_0`
1714
)

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
FIRST_VALUE(`int64_col` IGNORE NULLS) OVER (
9-
ORDER BY `int64_col` ASC NULLS LAST
10-
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
11-
) AS `bfcol_1`
8+
FIRST_VALUE(`int64_col` IGNORE NULLS) OVER (ORDER BY `int64_col` ASC NULLS LAST ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `bfcol_1`
129
FROM `bfcte_0`
1310
)
1411
SELECT

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ WITH `bfcte_0` AS (
88
CASE
99
WHEN `int64_col` IS NULL
1010
THEN NULL
11-
ELSE LAST_VALUE(`int64_col`) OVER (
12-
ORDER BY `int64_col` DESC
13-
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
14-
)
11+
ELSE LAST_VALUE(`int64_col`) OVER (ORDER BY `int64_col` DESC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
1512
END AS `bfcol_1`
1613
FROM `bfcte_0`
1714
)

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
LAST_VALUE(`int64_col` IGNORE NULLS) OVER (
9-
ORDER BY `int64_col` ASC NULLS LAST
10-
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
11-
) AS `bfcol_1`
8+
LAST_VALUE(`int64_col` IGNORE NULLS) OVER (ORDER BY `int64_col` ASC NULLS LAST ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `bfcol_1`
129
FROM `bfcte_0`
1310
)
1411
SELECT

tests/unit/core/compile/sqlglot/expressions/snapshots/test_geo_ops/test_geo_st_difference/out.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`geography_col` AS `bfcol_0`
3+
`geography_col`
44
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
ST_DIFFERENCE(`bfcol_0`, `bfcol_0`) AS `bfcol_1`
8+
ST_DIFFERENCE(`geography_col`, `geography_col`) AS `bfcol_1`
99
FROM `bfcte_0`
1010
)
1111
SELECT

tests/unit/core/compile/sqlglot/expressions/snapshots/test_numeric_ops/test_arctan2/out.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`bool_col` AS `bfcol_0`,
4-
`int64_col` AS `bfcol_1`,
5-
`float64_col` AS `bfcol_2`
3+
`bool_col`,
4+
`float64_col`,
5+
`int64_col`
66
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
77
), `bfcte_1` AS (
88
SELECT
99
*,
10-
ATAN2(`bfcol_1`, `bfcol_2`) AS `bfcol_6`,
11-
ATAN2(CAST(`bfcol_0` AS INT64), `bfcol_2`) AS `bfcol_7`
10+
ATAN2(`int64_col`, `float64_col`) AS `bfcol_6`,
11+
ATAN2(CAST(`bool_col` AS INT64), `float64_col`) AS `bfcol_7`
1212
FROM `bfcte_0`
1313
)
1414
SELECT

tests/unit/core/compile/sqlglot/expressions/snapshots/test_numeric_ops/test_cosine_distance/out.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`int_list_col` AS `bfcol_0`,
4-
`float_list_col` AS `bfcol_1`
3+
`float_list_col`,
4+
`int_list_col`
55
FROM `bigframes-dev`.`sqlglot_test`.`repeated_types`
66
), `bfcte_1` AS (
77
SELECT
88
*,
9-
ML.DISTANCE(`bfcol_0`, `bfcol_0`, 'COSINE') AS `bfcol_2`,
10-
ML.DISTANCE(`bfcol_1`, `bfcol_1`, 'COSINE') AS `bfcol_3`
9+
ML.DISTANCE(`int_list_col`, `int_list_col`, 'COSINE') AS `bfcol_2`,
10+
ML.DISTANCE(`float_list_col`, `float_list_col`, 'COSINE') AS `bfcol_3`
1111
FROM `bfcte_0`
1212
)
1313
SELECT

tests/unit/core/compile/sqlglot/snapshots/test_compile_isin/test_compile_isin_not_nullable/out.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ WITH `bfcte_1` AS (
2222
SELECT
2323
`bfcte_3`.*,
2424
`bfcte_3`.`bfcol_3` IN ((
25-
SELECT
26-
`rowindex_2` AS `bfcol_4`
27-
FROM `bfcte_2`
25+
SELECT
26+
`rowindex_2` AS `bfcol_4`
27+
FROM `bfcte_2`
2828
)) AS `bfcol_5`
2929
FROM `bfcte_3`
3030
)

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

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,10 @@ WITH `bfcte_0` AS (
2222
SELECT
2323
*,
2424
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
25+
WHEN SUM(CAST(NOT `bfcol_7` IS NULL AS INT64)) OVER (PARTITION BY `bfcol_9` ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) < 3
3026
THEN NULL
3127
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-
),
28+
SUM(CAST(`bfcol_7` AS INT64)) OVER (PARTITION BY `bfcol_9` ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST ROWS BETWEEN 3 PRECEDING AND CURRENT ROW),
3729
0
3830
)
3931
END AS `bfcol_15`
@@ -48,18 +40,10 @@ WITH `bfcte_0` AS (
4840
SELECT
4941
*,
5042
CASE
51-
WHEN SUM(CAST(NOT `bfcol_8` IS NULL AS INT64)) OVER (
52-
PARTITION BY `bfcol_9`
53-
ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST
54-
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
55-
) < 3
43+
WHEN SUM(CAST(NOT `bfcol_8` IS NULL AS INT64)) OVER (PARTITION BY `bfcol_9` ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) < 3
5644
THEN NULL
5745
ELSE COALESCE(
58-
SUM(`bfcol_8`) OVER (
59-
PARTITION BY `bfcol_9`
60-
ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST
61-
ROWS BETWEEN 3 PRECEDING AND CURRENT ROW
62-
),
46+
SUM(`bfcol_8`) OVER (PARTITION BY `bfcol_9` ORDER BY `bfcol_9` ASC NULLS LAST, `rowindex` ASC NULLS LAST ROWS BETWEEN 3 PRECEDING AND CURRENT ROW),
6347
0
6448
)
6549
END AS `bfcol_21`

0 commit comments

Comments
 (0)