-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: Add maintain_order
parameter to joins
#20026
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20026 +/- ##
==========================================
+ Coverage 79.54% 79.64% +0.10%
==========================================
Files 1564 1564
Lines 217211 217638 +427
Branches 2465 2475 +10
==========================================
+ Hits 172771 173342 +571
+ Misses 43879 43727 -152
- Partials 561 569 +8 ☔ View full report in Codecov by Sentry. |
crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs
Outdated
Show resolved
Hide resolved
crates/polars-ops/src/frame/join/hash_join/single_keys_dispatch.rs
Outdated
Show resolved
Hide resolved
41df7c2
to
b33ef3a
Compare
@@ -57,7 +57,7 @@ impl NodeTraverser { | |||
// Increment major on breaking changes to the IR (e.g. renaming | |||
// fields, reordering tuples), minor on backwards compatible | |||
// changes (e.g. exposing a new expression node). | |||
const VERSION: Version = (3, 2); | |||
const VERSION: Version = (4, 0); |
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 don't think this is a breaking IR change, but a minor version bump.
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.
We changed the structure of the tuple in the join options (one more field)
42c249e
to
1072cdc
Compare
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.
Looks great. I have left a few minor comments.
Could you also change the python type to None | MaintainOrder
?
crates/polars-pipe/src/executors/sinks/joins/generic_probe_inner_left.rs
Outdated
Show resolved
Hide resolved
maintain_order
parameter to joins
Good stuff :) |
The API docs specify the ordering for left joins as preserving the order of the left Dataframe. In some cases it can be useful to also have this property for other types of joins and in other cases having no required ordering can allow for performance optimizations.