Skip to content

Commit

Permalink
chore(bigquery): implement _finalize_memtable so we can handle the …
Browse files Browse the repository at this point in the history
…session dataset usage
  • Loading branch information
cpcloud committed Sep 10, 2024
1 parent dd2ee70 commit a98a0f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ibis/backends/bigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ def _in_memory_table_exists(self, name: str) -> bool:
else:
return True

def _finalize_memtable(self, name: str) -> None:
session_dataset = self._session_dataset
table_id = sg.table(
name,
db=session_dataset.dataset_id,
catalog=session_dataset.project,
quoted=self.compiler.quoted,
)
drop_sql_stmt = sge.Drop(kind="TABLE", this=table_id, exists=True)
self.raw_sql(drop_sql_stmt)

def _register_in_memory_table(self, op: ops.InMemoryTable) -> None:
session_dataset = self._session_dataset

Expand Down

0 comments on commit a98a0f5

Please sign in to comment.