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

Commit d76ffb1

Browse files
properly drop old cols in sql node compile
1 parent 6c96c84 commit d76ffb1

File tree

292 files changed

+169
-488
lines changed

Some content is hidden

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

292 files changed

+169
-488
lines changed

bigframes/core/compile/sqlglot/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def compile_sql_select(node: sql_nodes.SelectNode, child: ir.SQLGlotIR):
163163
)
164164
for cdef in node.selections
165165
)
166-
sqlglot_ir = sqlglot_ir.project(projected_cols)
166+
sqlglot_ir = sqlglot_ir.select(projected_cols)
167167

168168
if node.limit is not None:
169169
sqlglot_ir = sqlglot_ir.limit(node.limit)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ WITH `bfcte_0` AS (
99
FROM `bfcte_0`
1010
)
1111
SELECT
12-
*,
1312
`bfcol_2` AS `corr_col`
1413
FROM `bfcte_1`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ WITH `bfcte_0` AS (
99
FROM `bfcte_0`
1010
)
1111
SELECT
12-
*,
1312
`bfcol_2` AS `cov_col`
1413
FROM `bfcte_1`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ WITH `bfcte_0` AS (
1818
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
1919
)
2020
SELECT
21-
*,
2221
ROW_NUMBER() OVER () - 1 AS `row_number`
2322
FROM `bfcte_0`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ WITH `bfcte_0` AS (
44
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
55
)
66
SELECT
7-
*,
87
ROW_NUMBER() OVER (ORDER BY `int64_col` ASC NULLS LAST) - 1 AS `row_number`
98
FROM `bfcte_0`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ WITH `bfcte_0` AS (
2222
FROM `bfcte_0`
2323
)
2424
SELECT
25-
*,
2625
`bfcol_32` AS `size`
2726
FROM `bfcte_1`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ WITH `bfcte_0` AS (
88
FROM `bfcte_0`
99
)
1010
SELECT
11-
*,
1211
`bfcol_1` AS `int64_col`
1312
FROM `bfcte_1`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ WITH `bfcte_0` AS (
1414
FROM `bfcte_0`
1515
)
1616
SELECT
17-
*,
1817
`bfcol_1` AS `string_col`
1918
FROM `bfcte_1`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ WITH `bfcte_0` AS (
1010
FROM `bfcte_0`
1111
)
1212
SELECT
13-
*,
1413
`bfcol_2` AS `bool_col`,
1514
`bfcol_3` AS `int64_col`
1615
FROM `bfcte_1`

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ WITH `bfcte_0` AS (
44
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
55
)
66
SELECT
7-
*,
87
COALESCE(
98
LOGICAL_AND(`bool_col`) OVER (
109
ORDER BY `bool_col` ASC NULLS LAST

0 commit comments

Comments
 (0)