The parent class SQLCompiler doesn't implement update_from_clause(), and thus does not support UPDATE + JOIN. This PR uses the implementation in PostgreSQL to support this.
Thanks to @brian-pond for the thorough investigation!
P.S.
We added a third_party folder to vendor a code snippet from the postgresql portion of the sqlalchemy code. For future reference, in order to add vendored code, we need to do the following (for the exact change detail, check the content of this PR):
copy the minimum necessary code
Add the license files of the vendored project
add init.py files for necessary modules
in setup.py, add the vendored path and package to setup()
use sqlalchemy_bigquery_vendored as the package name instead of third_party because third_party is used in many different places
update owlbot.py so owlbot doesn't undo the change
The parent class
SQLCompiler
doesn't implementupdate_from_clause()
, and thus does not support UPDATE + JOIN. This PR uses the implementation in PostgreSQL to support this.Thanks to @brian-pond for the thorough investigation!
P.S. We added a
third_party
folder to vendor a code snippet from the postgresql portion of the sqlalchemy code. For future reference, in order to add vendored code, we need to do the following (for the exact change detail, check the content of this PR):sqlalchemy_bigquery_vendored
as the package name instead ofthird_party
becausethird_party
is used in many different placesthird_party
folder, see https://github.com/pypa/setuptools/issues/230#issuecomment-1473278299Thanks to @tswast for helping figure out the copyright and code vendoring details 🙂
Fixes #1010 🦕