Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: read_gbp works when table and column share a name #1079

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/system/small/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down