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

fix(bigquery): quote qualified memtable names #9149

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
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
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
Loading