fix(dbapi): avoid running % format when no query parameters are passed #346
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.
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 iflen(parameters) == 0
to avoid unnecessary format operations.python-bigquery/google/cloud/bigquery/dbapi/cursor.py
Line 444 in dca2e4c
The text was updated successfully, but these errors were encountered: