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

Commit 2398a60

Browse files
committed
correct indentifier for concat compiler
1 parent 1a7de78 commit 2398a60

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

bigframes/core/compile/sqlglot/sqlglot_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def from_union(
182182

183183
selections = [
184184
sge.Alias(
185-
this=expr.alias_or_name,
185+
this=sge.to_identifier(expr.alias_or_name, quoted=cls.quoted),
186186
alias=sge.to_identifier(output_id, quoted=cls.quoted),
187187
)
188188
for expr, output_id in zip(select_expr.expressions, output_ids)

tests/unit/core/compile/sqlglot/snapshots/test_compile_concat/test_compile_concat/out.sql

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ WITH `bfcte_1` AS (
4949
*
5050
FROM (
5151
SELECT
52-
bfcol_17 AS `bfcol_46`,
53-
bfcol_18 AS `bfcol_47`,
54-
bfcol_19 AS `bfcol_48`,
55-
bfcol_20 AS `bfcol_49`,
56-
bfcol_21 AS `bfcol_50`,
57-
bfcol_22 AS `bfcol_51`
52+
`bfcol_17` AS `bfcol_46`,
53+
`bfcol_18` AS `bfcol_47`,
54+
`bfcol_19` AS `bfcol_48`,
55+
`bfcol_20` AS `bfcol_49`,
56+
`bfcol_21` AS `bfcol_50`,
57+
`bfcol_22` AS `bfcol_51`
5858
FROM `bfcte_6`
5959
UNION ALL
6060
SELECT
61-
bfcol_40 AS `bfcol_46`,
62-
bfcol_41 AS `bfcol_47`,
63-
bfcol_42 AS `bfcol_48`,
64-
bfcol_43 AS `bfcol_49`,
65-
bfcol_44 AS `bfcol_50`,
66-
bfcol_45 AS `bfcol_51`
61+
`bfcol_40` AS `bfcol_46`,
62+
`bfcol_41` AS `bfcol_47`,
63+
`bfcol_42` AS `bfcol_48`,
64+
`bfcol_43` AS `bfcol_49`,
65+
`bfcol_44` AS `bfcol_50`,
66+
`bfcol_45` AS `bfcol_51`
6767
FROM `bfcte_7`
6868
)
6969
)

tests/unit/core/compile/sqlglot/test_compile_concat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
def test_compile_concat(
2525
scalars_types_pandas_df: pd.DataFrame, compiler_session: bigframes.Session, snapshot
2626
):
27-
# TODO: concat dataframes from a gbq table but trigger a windows compiler.
27+
# TODO(b/425739511): concat dataframes from a gbq table but trigger a windows compiler.
2828
df1 = bpd.DataFrame(scalars_types_pandas_df, session=compiler_session)
2929
df1 = df1[["rowindex", "int64_col", "string_col"]]
3030
concat_df = bpd.concat([df1, df1])

0 commit comments

Comments
 (0)