-
Notifications
You must be signed in to change notification settings - Fork 139
feat: support UPDATE + JOIN in BigQuery dialect #1083
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
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3b13ea6
feat: support UPDATE JOIN
Linchin 3cd5e5b
vendor code from sqlalchemy
Linchin f904928
remove code and add comments
Linchin 6c973e2
add vendored folder to path in MANIFEST.in
Linchin 7f8596d
remove extra code
Linchin 1320455
include third_party in pytest
Linchin 5f1b12e
update MANIFEST.in
Linchin 07876cf
add init file
Linchin 2e44255
Merge branch 'main' into update-join
Linchin 3d55c44
add init file
Linchin 7264c68
add pyproject.toml
Linchin 8309728
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] e7c4c3e
update noxfile and owlbot
Linchin 090b094
lint
Linchin 4b5c894
fix owlbot
Linchin d42cbb1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 3c94aca
undo changes for testing
Linchin 8ff10f8
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 63d69d3
add comments to pyproject.toml
Linchin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Added so third_party folder is included when running `pip install -e .` | ||
# See PR #1083 for more detail | ||
[build-system] | ||
chalmerlowe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
import itertools | ||
import os | ||
import re | ||
import setuptools | ||
from setuptools import setup | ||
|
||
# Package metadata. | ||
|
@@ -67,6 +68,16 @@ def readme(): | |
|
||
extras["all"] = set(itertools.chain.from_iterable(extras.values())) | ||
|
||
packages = [ | ||
package | ||
for package in setuptools.find_namespace_packages() | ||
if package.startswith("sqlalchemy_bigquery") | ||
] + [ | ||
package | ||
for package in setuptools.find_namespace_packages("third_party") | ||
if package.startswith("sqlalchemy_bigquery_vendored") | ||
] | ||
|
||
setup( | ||
name=name, | ||
version=version, | ||
|
@@ -75,7 +86,11 @@ def readme(): | |
long_description_content_type="text/x-rst", | ||
author="The Sqlalchemy-Bigquery Authors", | ||
author_email="[email protected]", | ||
packages=["sqlalchemy_bigquery"], | ||
package_dir={ | ||
"sqlalchemy-bigquery": "sqlalchemy_bigquery", | ||
"sqlalchemy_bigquery_vendored": "third_party/sqlalchemy_bigquery_vendored", | ||
}, | ||
packages=packages, | ||
url="https://github.com/googleapis/python-bigquery-sqlalchemy", | ||
keywords=["bigquery", "sqlalchemy"], | ||
classifiers=[ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
30 changes: 30 additions & 0 deletions
30
third_party/sqlalchemy_bigquery_vendored/sqlalchemy/AUTHORS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
SQLAlchemy was created by Michael Bayer. | ||
|
||
Major contributing authors include: | ||
|
||
- Mike Bayer | ||
- Jason Kirtland | ||
- Michael Trier | ||
- Diana Clarke | ||
- Gaetan de Menten | ||
- Lele Gaifax | ||
- Jonathan Ellis | ||
- Gord Thompson | ||
- Federico Caselli | ||
- Philip Jenvey | ||
- Rick Morrison | ||
- Chris Withers | ||
- Ants Aasma | ||
- Sheila Allen | ||
- Paul Johnston | ||
- Tony Locke | ||
- Hajime Nakagami | ||
- Vraj Mohan | ||
- Robert Leftwich | ||
- Taavi Burns | ||
- Jonathan Vanasco | ||
- Jeff Widman | ||
- Scott Dugas | ||
- Dobes Vandermeer | ||
- Ville Skytta | ||
- Rodrigo Menezes |
19 changes: 19 additions & 0 deletions
19
third_party/sqlalchemy_bigquery_vendored/sqlalchemy/LICENSE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright 2005-2024 SQLAlchemy authors and contributors <see AUTHORS file>. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
6 changes: 6 additions & 0 deletions
6
third_party/sqlalchemy_bigquery_vendored/sqlalchemy/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# __init__.py | ||
# Copyright (C) 2005-2024 the SQLAlchemy authors and contributors | ||
# <see AUTHORS file> | ||
# | ||
# This module is part of SQLAlchemy and is released under | ||
# the MIT License: https://www.opensource.org/licenses/mit-license.php |
Empty file.
19 changes: 19 additions & 0 deletions
19
third_party/sqlalchemy_bigquery_vendored/sqlalchemy/postgresql/base.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# dialects/postgresql/base.py | ||
# Copyright (C) 2005-2024 the SQLAlchemy authors and contributors | ||
# <see AUTHORS file> | ||
# | ||
# This module is part of SQLAlchemy and is released under | ||
# the MIT License: https://www.opensource.org/licenses/mit-license.php | ||
# mypy: ignore-errors | ||
|
||
from sqlalchemy.sql import compiler | ||
|
||
|
||
class PGCompiler(compiler.SQLCompiler): | ||
def update_from_clause( | ||
self, update_stmt, from_table, extra_froms, from_hints, **kw | ||
): | ||
kw["asfrom"] = True | ||
return "FROM " + ", ".join( | ||
t._compiler_dispatch(self, fromhints=from_hints, **kw) for t in extra_froms | ||
) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.