File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed
tests/unit/core/compile/sqlglot/aggregations
snapshots/test_unary_compiler Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 11WITH ` bfcte_0` AS (
22 SELECT
3- ` int64_col` AS ` bfcol_0` ,
4- ` rowindex` AS ` bfcol_1`
3+ ` int64_col` AS ` bfcol_0`
54 FROM ` bigframes-dev` .` sqlglot_test` .` scalar_types`
65), ` bfcte_1` AS (
76 SELECT
87 * ,
9- DENSE_RANK() OVER (ORDER BY ` bfcol_0` IS NULL ASC NULLS LAST, ` bfcol_0` ASC NULLS LAST) AS ` bfcol_4 `
8+ DENSE_RANK() OVER (ORDER BY ` bfcol_0` IS NULL ASC NULLS LAST, ` bfcol_0` ASC NULLS LAST) AS ` bfcol_1 `
109 FROM ` bfcte_0`
1110)
1211SELECT
13- ` bfcol_1` AS ` bfuid_col_1` ,
14- ` bfcol_0` AS ` int64_col` ,
15- ` bfcol_4` AS ` agg_int64`
12+ ` bfcol_1` AS ` agg_int64`
1613FROM ` bfcte_1`
Original file line number Diff line number Diff line change 11WITH ` bfcte_0` AS (
22 SELECT
3- ` int64_col` AS ` bfcol_0` ,
4- ` rowindex` AS ` bfcol_1`
3+ ` int64_col` AS ` bfcol_0`
54 FROM ` bigframes-dev` .` sqlglot_test` .` scalar_types`
65), ` bfcte_1` AS (
76 SELECT
87 * ,
9- RANK() OVER (ORDER BY ` bfcol_0` IS NULL ASC NULLS LAST, ` bfcol_0` ASC NULLS LAST) AS ` bfcol_4 `
8+ RANK() OVER (ORDER BY ` bfcol_0` IS NULL ASC NULLS LAST, ` bfcol_0` ASC NULLS LAST) AS ` bfcol_1 `
109 FROM ` bfcte_0`
1110)
1211SELECT
13- ` bfcol_1` AS ` bfuid_col_1` ,
14- ` bfcol_0` AS ` int64_col` ,
15- ` bfcol_4` AS ` agg_int64`
12+ ` bfcol_1` AS ` agg_int64`
1613FROM ` bfcte_1`
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def _apply_unary_window_op(
5757 window_spec = window_spec ,
5858 output_name = identifiers .ColumnId (new_name ),
5959 )
60- result = array_value .ArrayValue (win_node )
60+ result = array_value .ArrayValue (win_node ). select_columns ([ new_name ])
6161
6262 sql = result .session ._executor .to_sql (result , enable_cache = False )
6363 return sql
You can’t perform that action at this time.
0 commit comments