-
Notifications
You must be signed in to change notification settings - Fork 610
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): escape table names with spaces for bigquery backend #9589
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @akanz1, thanks for the bug report and the PR!!
Two questions for you:
- Can you add a simple test for this? I think creating a table with a space in the name, and then demonstrating that we can grab a reference to it is sufficient.
- Should we include a check that
name
isn't already quoted with backticks? I don't think double-backticks are valid (or at leastsqlglot
doesn't like them)
I don't think we should include a check for already quoted things. We don't allow backend specific quoting for |
I'll probably need to go through the projects dev setup and have a look at how you test similar cases. If you can point me to an example that would be great, I'll likely get to it later this week. |
Hi @akanz1 -- we have a test for Bigquery for creating temp tables -- you can look at You can do something similar there, but with the name being something like That will confirm that we can create tables that have spaces in the names (might need to add handling for that to You will also want to set the env-var |
Pushed up a test so we can get this out in 9.2 |
BigQuery tests are passing:
|
This only touches the BigQuery backend, and the bigquery compiler tests pass, so merging! |
@akanz1 Thanks for the PR! |
Awesome, thanks a lot guys! |
Description of changes
bigquery docs "[Identifiers] Must be enclosed by backtick (`) characters."
Issues closed