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 all parts of table names #9141

Merged
merged 1 commit into from
May 7, 2024

Conversation

gforsyth
Copy link
Member

@gforsyth gforsyth commented May 7, 2024

The BigQuery identifier quoting semantics are bonkers
https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#identifiers

my-table is OK, but not mydataset.my-table

mytable-287 is OK, but not mytable-287a

Just quote everything.

xref #8679


for key in ("this", "db", "catalog"):
if (val := table.args[key]) is not None:
assert val.quoted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we instead test the expected output as part of the test parameterization?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

The BigQuery identifier quoting semantics are bonkers
https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#identifiers

my-table is OK, but not mydataset.my-table

mytable-287 is OK, but not mytable-287a

Just quote everything.
@gforsyth gforsyth force-pushed the bigquery_location_quoting branch from 8e1902f to 5c05192 Compare May 7, 2024 15:48
@gforsyth
Copy link
Member Author

gforsyth commented May 7, 2024

running bigquery tests locally -- I suspect this may update a few snapshots

@cpcloud cpcloud added this to the 9.1 milestone May 7, 2024
@cpcloud cpcloud added bug Incorrect behavior inside of ibis bigquery The BigQuery backend labels May 7, 2024
@cpcloud cpcloud merged commit e1338d5 into ibis-project:main May 7, 2024
86 checks passed
@gforsyth gforsyth deleted the bigquery_location_quoting branch May 7, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery The BigQuery backend bug Incorrect behavior inside of ibis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants