diff --git a/tests/system/small/test_session.py b/tests/system/small/test_session.py index 4b48915d2d..8685bdf216 100644 --- a/tests/system/small/test_session.py +++ b/tests/system/small/test_session.py @@ -404,6 +404,17 @@ def test_read_gbq_on_linked_dataset_warns(session, source_table): assert warned[0].category == bigframes.exceptions.TimeTravelDisabledWarning +def test_read_gbq_w_ambigous_name( + session: bigframes.Session, +): + # Ensure read_gbq works when table and column share a name + df = session.read_gbq( + "bigframes-dev.bigframes_tests_sys.ambiguous_name" + ).to_pandas() + pd_df = pd.DataFrame({"x": [2, 1], "ambiguous_name": [20, 10]}) + pd.testing.assert_frame_equal(df, pd_df, check_dtype=False, check_index_type=False) + + def test_read_gbq_table_clustered_with_filter(session: bigframes.Session): df = session.read_gbq_table( "bigquery-public-data.cloud_storage_geo_index.landsat_index",