Skip to content

Commit a0490a4

Browse files
authored
fix: avoid ibis warning for "database" table() method argument (#390)
1 parent 469674d commit a0490a4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bigframes/session/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,8 +959,8 @@ def _read_pandas_load_job(
959959
)
960960
table_expression = self.ibis_client.table( # type: ignore
961961
load_table_destination.table_id,
962-
# TODO: use "dataset_id" as the "schema"
963-
database=f"{load_table_destination.project}.{load_table_destination.dataset_id}",
962+
schema=load_table_destination.dataset_id,
963+
database=load_table_destination.project,
964964
)
965965

966966
# 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.
@@ -1542,7 +1542,9 @@ def _cache_with_cluster_cols(
15421542
ibis_expr, cluster_cols=cluster_cols, api_name="cached"
15431543
)
15441544
table_expression = self.ibis_client.table(
1545-
f"{tmp_table.project}.{tmp_table.dataset_id}.{tmp_table.table_id}"
1545+
tmp_table.table_id,
1546+
schema=tmp_table.dataset_id,
1547+
database=tmp_table.project,
15461548
)
15471549
new_columns = [table_expression[column] for column in compiled_value.column_ids]
15481550
new_hidden_columns = [
@@ -1571,7 +1573,9 @@ def _cache_with_offsets(self, array_value: core.ArrayValue) -> core.ArrayValue:
15711573
ibis_expr, cluster_cols=["bigframes_offsets"], api_name="cached"
15721574
)
15731575
table_expression = self.ibis_client.table(
1574-
f"{tmp_table.project}.{tmp_table.dataset_id}.{tmp_table.table_id}"
1576+
tmp_table.table_id,
1577+
schema=tmp_table.dataset_id,
1578+
database=tmp_table.project,
15751579
)
15761580
new_columns = [table_expression[column] for column in compiled_value.column_ids]
15771581
new_hidden_columns = [table_expression["bigframes_offsets"]]

0 commit comments

Comments
 (0)