Skip to content

Commit

Permalink
fix(bigquery): quote qualified memtable names (#9149)
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth authored May 8, 2024
1 parent ac2201d commit 878d0d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/bigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def _qualify_memtable(
if isinstance(node, sge.Table) and _MEMTABLE_PATTERN.match(node.name) is not None:
node.args["db"] = dataset
node.args["catalog"] = project
# make sure to quote table location
node = _force_quote_table(node)
return node


Expand Down
2 changes: 2 additions & 0 deletions ibis/backends/bigquery/tests/system/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ def test_fully_qualified_memtable_compile(project_id, dataset_id):
assert new_bq_con._session_dataset is not None
assert project_id in sql

assert f"`{project_id}`.`{new_bq_con._session_dataset.dataset_id}`.`" in sql


def test_create_table_with_options(con):
name = gen_name("bigquery_temp_table")
Expand Down

0 comments on commit 878d0d5

Please sign in to comment.