Skip to content

fix: avoid ibis warning for "database" table() method argument #390

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

Merged
merged 2 commits into from
Feb 26, 2024
Merged
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
12 changes: 8 additions & 4 deletions bigframes/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,8 @@ def _read_pandas_load_job(
)
table_expression = self.ibis_client.table( # type: ignore
load_table_destination.table_id,
# TODO: use "dataset_id" as the "schema"
database=f"{load_table_destination.project}.{load_table_destination.dataset_id}",
schema=load_table_destination.dataset_id,
database=load_table_destination.project,
)

# b/297590178 Potentially a bug in bqclient.load_table_from_dataframe(), that only when the DF is empty, the index columns disappear in table_expression.
Expand Down Expand Up @@ -1542,7 +1542,9 @@ def _cache_with_cluster_cols(
ibis_expr, cluster_cols=cluster_cols, api_name="cached"
)
table_expression = self.ibis_client.table(
f"{tmp_table.project}.{tmp_table.dataset_id}.{tmp_table.table_id}"
tmp_table.table_id,
schema=tmp_table.dataset_id,
database=tmp_table.project,
)
new_columns = [table_expression[column] for column in compiled_value.column_ids]
new_hidden_columns = [
Expand Down Expand Up @@ -1571,7 +1573,9 @@ def _cache_with_offsets(self, array_value: core.ArrayValue) -> core.ArrayValue:
ibis_expr, cluster_cols=["bigframes_offsets"], api_name="cached"
)
table_expression = self.ibis_client.table(
f"{tmp_table.project}.{tmp_table.dataset_id}.{tmp_table.table_id}"
tmp_table.table_id,
schema=tmp_table.dataset_id,
database=tmp_table.project,
)
new_columns = [table_expression[column] for column in compiled_value.column_ids]
new_hidden_columns = [table_expression["bigframes_offsets"]]
Expand Down