Skip to content

Commit bf90741

Browse files
authored
test: read_gbp works when table and column share a name (#1079)
1 parent 8077ff4 commit bf90741

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/system/small/test_session.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,17 @@ def test_read_gbq_on_linked_dataset_warns(session, source_table):
403403
assert warned[0].category == bigframes.exceptions.TimeTravelDisabledWarning
404404

405405

406+
def test_read_gbq_w_ambigous_name(
407+
session: bigframes.Session,
408+
):
409+
# Ensure read_gbq works when table and column share a name
410+
df = session.read_gbq(
411+
"bigframes-dev.bigframes_tests_sys.ambiguous_name"
412+
).to_pandas()
413+
pd_df = pd.DataFrame({"x": [2, 1], "ambiguous_name": [20, 10]})
414+
pd.testing.assert_frame_equal(df, pd_df, check_dtype=False, check_index_type=False)
415+
416+
406417
def test_read_gbq_table_clustered_with_filter(session: bigframes.Session):
407418
df = session.read_gbq_table(
408419
"bigquery-public-data.cloud_storage_geo_index.landsat_index",

0 commit comments

Comments
 (0)