[Python] Add __getattr__ and __getitem__ implementations for DuckDBPyRelation#6624
Merged
Mytherin merged 4 commits intoduckdb:masterfrom Mar 9, 2023
Merged
[Python] Add __getattr__ and __getitem__ implementations for DuckDBPyRelation#6624Mytherin merged 4 commits intoduckdb:masterfrom
__getattr__ and __getitem__ implementations for DuckDBPyRelation#6624Mytherin merged 4 commits intoduckdb:masterfrom
Conversation
Mytherin
approved these changes
Mar 8, 2023
Collaborator
Mytherin
left a comment
There was a problem hiding this comment.
Thanks for the PR! LGTM
Contributor
Author
|
Not sure what's up with this failure in https://github.com/duckdb/duckdb/actions/runs/4365008302/jobs/7635131271 It fails on |
Collaborator
|
Yep that's a network issue |
Mause
reviewed
Mar 9, 2023
|
|
||
| void Close(); | ||
|
|
||
| unique_ptr<DuckDBPyRelation> GetAttribute(const string &name); |
Contributor
There was a problem hiding this comment.
I assume this just throws a TypeError if you do relation[None]?
Contributor
Author
There was a problem hiding this comment.
Yea it can't implicitly convert it to string, but might be worth a test 👍
Mause
approved these changes
Mar 9, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds the following syntax:
relation.column_of_relationrelation['column_of_relation']Example: