We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b37e6f9 commit 6281aadCopy full SHA for 6281aad
packages/bigframes/bigframes/core/compile/sqlglot/sqlglot_ir.py
@@ -214,6 +214,10 @@ def from_table(
214
if not columns and not sql_predicate:
215
return cls.from_expr(expr=table_expr, uid_gen=uid_gen)
216
217
+ # Qualify column references with the table alias to avoid ambiguity
218
+ # when a table and a column share the same name. Without this, BigQuery
219
+ # might interpret the column as a reference to the table (STRUCT),
220
+ # causing failures when casting (e.g. in test_read_gbq_w_ambigous_name).
221
select_items: list[sge.Expression] = (
222
[sge.Column(this=sql.identifier(col), table=sql.identifier(table_alias)) for col in columns]
223
if columns
0 commit comments