BigQuery doesn't allow a DELETE without a WHERE. Including at least a WHERE true (or maybe WHERE 1=1) in all deletes seems harmless.
For the BigQuery compliance tests, I overrode visit_delete in tests to provide a where clause when it was missing:
https://github.com/googleapis/python-bigquery-sqlalchemy/blob/d0edaea6b104e898859454fc363baf2d4a487d1b/tests/sqlalchemy_dialect_compliance/conftest.py#L48-L58
I only did this if teardown methods where in the stack, so it seems no tests would trigger a WHEREless `DELETE.
Maybe this is a BigQuery-specific issue and I should just override visit_delete in the BigQuery dialect to always add a where clause if none is provided.
Thoughts?
BigQuery doesn't allow a
DELETEwithout aWHERE. Including at least aWHERE true(or maybeWHERE 1=1) in all deletes seems harmless.For the BigQuery compliance tests, I overrode
visit_deletein tests to provide awhereclause when it was missing:https://github.com/googleapis/python-bigquery-sqlalchemy/blob/d0edaea6b104e898859454fc363baf2d4a487d1b/tests/sqlalchemy_dialect_compliance/conftest.py#L48-L58
I only did this if teardown methods where in the stack, so it seems no tests would trigger a
WHEREless `DELETE.Maybe this is a BigQuery-specific issue and I should just override
visit_deletein the BigQuery dialect to always add a where clause if none is provided.Thoughts?