-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Implement merge_sorted
for binary
#21045
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #21045 +/- ##
==========================================
- Coverage 79.27% 79.27% -0.01%
==========================================
Files 1583 1585 +2
Lines 225549 225624 +75
Branches 2586 2588 +2
==========================================
+ Hits 178810 178865 +55
- Misses 46149 46169 +20
Partials 590 590 ☔ View full report in Codecov by Sentry. |
@@ -157,6 +157,12 @@ fn series_to_merge_indicator(lhs: &Series, rhs: &Series) -> Vec<bool> { | |||
|
|||
get_merge_indicator(lhs.into_iter(), rhs.into_iter()) | |||
}, | |||
DataType::Binary => { |
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.
Can you dispatch String
via binary as well? That saves an extra monomorphization.
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.
@@ -152,14 +152,18 @@ fn series_to_merge_indicator(lhs: &Series, rhs: &Series) -> Vec<bool> { | |||
get_merge_indicator(lhs.into_iter(), rhs.into_iter()) | |||
}, | |||
DataType::String => { | |||
let lhs = lhs_s.str().unwrap(); | |||
let rhs = rhs_s.str().unwrap(); | |||
// SAFETY: String to Binary is valid. |
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 don't need unsafe nor casts here:
let lhs = lhs.str().unwrap().as_binary();
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.
Ahh ok. Fixed.
b8f5095
to
9d33c26
Compare
Quite trivial, closes #20988