-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add left join type to python relational API #2918
Conversation
tools/pythonpkg/src/pyrelation.cpp
Outdated
"in join_condition", | ||
py::arg("other_rel"), py::arg("join_condition")) | ||
"in join_condition. Types supported are 'inner' and 'left'", | ||
py::arg("other_rel"), py::arg("condition"), py::arg("type") = "left") |
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.
Maybe default to inner?
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.
I agree, since join
implies inner join
in SQL, it makes sense to reflect that fact in the API here. I think it offers the least surprise 🙂
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.
ah yes that's a mistake
@@ -100,7 +100,7 @@ struct DuckDBPyRelation { | |||
|
|||
unique_ptr<DuckDBPyRelation> Map(py::function fun); | |||
|
|||
unique_ptr<DuckDBPyRelation> Join(DuckDBPyRelation *other, const string &condition); | |||
unique_ptr<DuckDBPyRelation> Join(DuckDBPyRelation *other, const string &condition, const string &type); |
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.
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.
Sure
e.g.