Skip to content

Commit 49f52c1

Browse files
committed
snapshot
1 parent e63db8e commit 49f52c1

File tree

214 files changed

+2298
-1976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+2298
-1976
lines changed

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_binary_compiler/test_corr/out.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`int64_col` AS `bfcol_0`,
4-
`float64_col` AS `bfcol_1`
5-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` INT64, `bfcol_1` FLOAT64>>[STRUCT(CAST(NULL AS INT64), CAST(NULL AS FLOAT64))])
65
), `bfcte_1` AS (
76
SELECT
87
CORR(`bfcol_0`, `bfcol_1`) AS `bfcol_2`

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_binary_compiler/test_cov/out.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`int64_col` AS `bfcol_0`,
4-
`float64_col` AS `bfcol_1`
5-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` INT64, `bfcol_1` FLOAT64>>[STRUCT(CAST(NULL AS INT64), CAST(NULL AS FLOAT64))])
65
), `bfcte_1` AS (
76
SELECT
87
COVAR_SAMP(`bfcol_0`, `bfcol_1`) AS `bfcol_2`
Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,15 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`bool_col` AS `bfcol_0`,
4-
`bytes_col` AS `bfcol_1`,
5-
`date_col` AS `bfcol_2`,
6-
`datetime_col` AS `bfcol_3`,
7-
`geography_col` AS `bfcol_4`,
8-
`int64_col` AS `bfcol_5`,
9-
`int64_too` AS `bfcol_6`,
10-
`numeric_col` AS `bfcol_7`,
11-
`float64_col` AS `bfcol_8`,
12-
`rowindex` AS `bfcol_9`,
13-
`rowindex_2` AS `bfcol_10`,
14-
`string_col` AS `bfcol_11`,
15-
`time_col` AS `bfcol_12`,
16-
`timestamp_col` AS `bfcol_13`,
17-
`duration_col` AS `bfcol_14`
18-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` BOOLEAN, `bfcol_1` INT64>>[STRUCT(CAST(NULL AS BOOLEAN), 0)])
195
), `bfcte_1` AS (
206
SELECT
217
*,
22-
ROW_NUMBER() OVER () AS `bfcol_32`
8+
ROW_NUMBER() OVER (ORDER BY `bfcol_1` ASC NULLS LAST) AS `bfcol_3`
239
FROM `bfcte_0`
2410
)
2511
SELECT
26-
`bfcol_32` AS `row_number`
27-
FROM `bfcte_1`
12+
`bfcol_3` AS `row_number`
13+
FROM `bfcte_1`
14+
ORDER BY
15+
`bfcol_1` ASC NULLS LAST
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`int64_col` AS `bfcol_0`
4-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` INT64, `bfcol_1` INT64>>[STRUCT(CAST(NULL AS INT64), 0)])
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
ROW_NUMBER() OVER (ORDER BY `bfcol_0` ASC NULLS LAST) AS `bfcol_1`
8+
ROW_NUMBER() OVER (ORDER BY `bfcol_0` ASC NULLS LAST, `bfcol_1` ASC NULLS LAST) AS `bfcol_2`
99
FROM `bfcte_0`
1010
)
1111
SELECT
12-
`bfcol_1` AS `row_number`
13-
FROM `bfcte_1`
12+
`bfcol_2` AS `row_number`
13+
FROM `bfcte_1`
14+
ORDER BY
15+
`bfcol_1` ASC NULLS LAST

tests/unit/core/compile/sqlglot/aggregations/snapshots/test_nullary_compiler/test_size/out.sql

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`bool_col` AS `bfcol_0`,
4-
`bytes_col` AS `bfcol_1`,
5-
`date_col` AS `bfcol_2`,
6-
`datetime_col` AS `bfcol_3`,
7-
`geography_col` AS `bfcol_4`,
8-
`int64_col` AS `bfcol_5`,
9-
`int64_too` AS `bfcol_6`,
10-
`numeric_col` AS `bfcol_7`,
11-
`float64_col` AS `bfcol_8`,
12-
`rowindex` AS `bfcol_9`,
13-
`rowindex_2` AS `bfcol_10`,
14-
`string_col` AS `bfcol_11`,
15-
`time_col` AS `bfcol_12`,
16-
`timestamp_col` AS `bfcol_13`,
17-
`duration_col` AS `bfcol_14`
18-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` BOOLEAN, `bfcol_1` BYTES, `bfcol_2` DATE, `bfcol_3` DATETIME, `bfcol_4` GEOGRAPHY, `bfcol_5` INT64, `bfcol_6` INT64, `bfcol_7` NUMERIC, `bfcol_8` FLOAT64, `bfcol_9` INT64, `bfcol_10` INT64, `bfcol_11` STRING, `bfcol_12` TIME, `bfcol_13` TIMESTAMP, `bfcol_14` INT64>>[STRUCT(
5+
CAST(NULL AS BOOLEAN),
6+
CAST(NULL AS BYTES),
7+
CAST(NULL AS DATE),
8+
CAST(NULL AS DATETIME),
9+
CAST(NULL AS GEOGRAPHY),
10+
CAST(NULL AS INT64),
11+
CAST(NULL AS INT64),
12+
CAST(NULL AS NUMERIC),
13+
CAST(NULL AS FLOAT64),
14+
CAST(NULL AS INT64),
15+
CAST(NULL AS INT64),
16+
CAST(NULL AS STRING),
17+
CAST(NULL AS TIME),
18+
CAST(NULL AS TIMESTAMP),
19+
CAST(NULL AS INT64)
20+
)])
1921
), `bfcte_1` AS (
2022
SELECT
2123
COUNT(1) AS `bfcol_32`
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`int64_col` AS `bfcol_0`
4-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` INT64, `bfcol_1` INT64>>[STRUCT(CAST(NULL AS INT64), 0)])
55
), `bfcte_1` AS (
66
SELECT
7-
ARRAY_AGG(`bfcol_0` IGNORE NULLS ORDER BY `bfcol_0` IS NULL ASC, `bfcol_0` ASC) AS `bfcol_1`
7+
ARRAY_AGG(
8+
`bfcol_0` IGNORE NULLS ORDER BY `bfcol_0` IS NULL ASC, `bfcol_0` ASC, `bfcol_1` IS NULL ASC, `bfcol_1` ASC
9+
) AS `bfcol_2`
810
FROM `bfcte_0`
911
)
1012
SELECT
11-
`bfcol_1` AS `int64_col`
13+
`bfcol_2` AS `int64_col`
1214
FROM `bfcte_1`
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`string_col` AS `bfcol_0`
4-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` STRING, `bfcol_1` INT64>>[STRUCT(CAST(NULL AS STRING), 0)])
55
), `bfcte_1` AS (
66
SELECT
7-
COALESCE(STRING_AGG(`bfcol_0`, ','
8-
ORDER BY
9-
`bfcol_0` IS NULL ASC,
10-
`bfcol_0` ASC), '') AS `bfcol_1`
7+
COALESCE(
8+
STRING_AGG(
9+
`bfcol_0`, ','
10+
ORDER BY
11+
`bfcol_0` IS NULL ASC,
12+
`bfcol_0` ASC,
13+
`bfcol_1` IS NULL ASC,
14+
`bfcol_1` ASC
15+
),
16+
''
17+
) AS `bfcol_2`
1118
FROM `bfcte_0`
1219
)
1320
SELECT
14-
`bfcol_1` AS `string_col`
21+
`bfcol_2` AS `string_col`
1522
FROM `bfcte_1`

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`bool_col` AS `bfcol_0`
4-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` BOOLEAN>>[STRUCT(CAST(NULL AS BOOLEAN))])
55
), `bfcte_1` AS (
66
SELECT
77
COALESCE(LOGICAL_AND(`bfcol_0`), TRUE) AS `bfcol_1`
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`bool_col` AS `bfcol_0`
4-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` BOOLEAN, `bfcol_1` INT64>>[STRUCT(CAST(NULL AS BOOLEAN), 0)])
55
), `bfcte_1` AS (
66
SELECT
77
*,
88
CASE
99
WHEN `bfcol_0` IS NULL
1010
THEN NULL
1111
ELSE COALESCE(LOGICAL_AND(`bfcol_0`) OVER (), TRUE)
12-
END AS `bfcol_1`
12+
END AS `bfcol_2`
1313
FROM `bfcte_0`
1414
)
1515
SELECT
16-
`bfcol_1` AS `agg_bool`
17-
FROM `bfcte_1`
16+
`bfcol_2` AS `agg_bool`
17+
FROM `bfcte_1`
18+
ORDER BY
19+
`bfcol_1` ASC NULLS LAST
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
WITH `bfcte_0` AS (
22
SELECT
3-
`bool_col` AS `bfcol_0`,
4-
`string_col` AS `bfcol_1`
5-
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
3+
*
4+
FROM UNNEST(ARRAY<STRUCT<`bfcol_0` BOOLEAN, `bfcol_1` STRING, `bfcol_2` INT64>>[STRUCT(CAST(NULL AS BOOLEAN), CAST(NULL AS STRING), 0)])
65
), `bfcte_1` AS (
76
SELECT
87
*,
98
CASE
109
WHEN `bfcol_0` IS NULL
1110
THEN NULL
1211
ELSE COALESCE(LOGICAL_AND(`bfcol_0`) OVER (PARTITION BY `bfcol_1`), TRUE)
13-
END AS `bfcol_2`
12+
END AS `bfcol_3`
1413
FROM `bfcte_0`
1514
)
1615
SELECT
17-
`bfcol_2` AS `agg_bool`
18-
FROM `bfcte_1`
16+
`bfcol_3` AS `agg_bool`
17+
FROM `bfcte_1`
18+
ORDER BY
19+
`bfcol_2` ASC NULLS LAST

0 commit comments

Comments
 (0)