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(dbapi): avoid running % format when no query parameters are passed #346

Closed
tswast opened this issue Oct 27, 2020 · 0 comments · Fixed by #348
Closed

fix(dbapi): avoid running % format when no query parameters are passed #346

tswast opened this issue Oct 27, 2020 · 0 comments · Fixed by #348
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@tswast
Copy link
Contributor

tswast commented Oct 27, 2020

Is your feature request related to a problem? Please describe.

It is unexpected to get format errors when a string contains %, but there are no query parameters in the query.

googleapis/python-bigquery-sqlalchemy#72

Describe the solution you'd like

In addition to checking if parameters is none, check if len(parameters) == 0 to avoid unnecessary format operations.

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Oct 27, 2020
@tswast tswast added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 27, 2020
@HemangChothani HemangChothani self-assigned this Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants