Skip to content

fix: Improve escaping of literals and identifiers #682

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

Merged
merged 12 commits into from
May 15, 2024
Merged
Prev Previous commit
Next Next commit
restore separate quoting of each table ref component
  • Loading branch information
TrevorBergeron committed May 13, 2024
commit 9057d91cd98d1ba4ba3eb0d731eee7eae70a2c27
2 changes: 1 addition & 1 deletion bigframes/core/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def csv(values: Iterable[str], quoted=False) -> str:


def table_reference(table_ref: bigquery.TableReference) -> str:
return f"`{table_ref.project}.{table_ref.dataset_id}.{table_ref.table_id}`"
return f"`{escape_special_characters(table_ref.project)}`.`{escape_special_characters(table_ref.dataset_id)}`.`{escape_special_characters(table_ref.table_id)}`"


def infix_op(opname: str, left_arg: str, right_arg: str):
Expand Down