-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Make databricks sql hook return a namedtuple #36205
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
bolkedebruin
merged 22 commits into
apache:main
from
infrabel:fix/make-databricks-returns-namedtuples
Dec 22, 2023
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1dc6553
feat: Databricks sql hook returns json-serializable namedtuple
joffreybienvenu-infrabel 6a35e30
fix: Ignore mypy
joffreybienvenu-infrabel e09a34b
fix: correctly describe serialization
joffreybienvenu-infrabel b11f883
feat: disable the return of serializable namedtuple by default
joffreybienvenu-infrabel 837d460
fix: make DatabricksSqlOperator return serializable object by default
joffreybienvenu-infrabel c653798
fix: add `return_serializable` to databricks operator tests
joffreybienvenu-infrabel 7c00732
fix: docstring spellchecks
joffreybienvenu-infrabel eceec0b
fix: rewrite docstring and warning message
joffreybienvenu-infrabel 67d1b90
fix: docstring spellchecks
joffreybienvenu-infrabel 1e84a75
feat: rename `make_serializable` into `make_common_data_structure` fo…
joffreybienvenu-infrabel e76d5b8
feat: Add typing for `_make_common_data_structure` in databricks
joffreybienvenu-infrabel a82553e
feat: Apply typing to ODBC hook
joffreybienvenu-infrabel d3510ef
fix: patch pyodbc.Row to make isinstance() checks pass with row_mock …
joffreybienvenu-infrabel 0f20dfb
fix: Use List in type casting for python38 compatibility
joffreybienvenu-infrabel ab87191
feat: Remove all mentions of serialization in databricks hook
joffreybienvenu-infrabel 10e22c7
feat: Rename `_make_serializable` into `_make_common_data_structure` …
joffreybienvenu-infrabel 4796882
fix: use `return_tuple` in databricks tests
joffreybienvenu-infrabel 61255ed
fix: add deprecated _make_serializable method in odbc.py
joffreybienvenu-infrabel e54ca54
bump: min sql.common to 1.9.1 for odbc and databricks
joffreybienvenu-infrabel e0c7ad4
fix: add version 1.9.1 to provider.yaml of common.sql
joffreybienvenu-infrabel 74a763d
fix: move back-compat in common.sql
joffreybienvenu-infrabel affd2f4
feat: Implement strict `tuple`/`list[tuple]` return in ODBC and Datab…
joffreybienvenu-infrabel 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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mypy was not happy with
-> tuple | list[tuple] | list[list[tuple] | tuple]as output - which is correct. I got error: "Overloaded function signatures 1 and 2 overlap with incompatible return types".Following mypy docs, I added a
Nonefor it to be stop complaining. But that's not correct, this method cannot return None when a handler is provided...Implementing definitive typing is out of the scope of this PR, and I admit mypy beat me on that case. Thus I let that for #36224 - but I'm whiling to help on that issue too of course.