-
Notifications
You must be signed in to change notification settings - Fork 174
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 .str.split()
API for splitting string columns.
#1409
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1409 +/- ##
==========================================
+ Coverage 74.61% 74.64% +0.03%
==========================================
Files 60 60
Lines 6034 6042 +8
==========================================
+ Hits 4502 4510 +8
Misses 1532 1532
|
@@ -129,7 +129,8 @@ impl FullNull for ListArray { | |||
Self::new( | |||
Field::new(name, dtype.clone()), | |||
empty_flat_child, | |||
OffsetsBuffer::try_from(repeat(0).take(length).collect::<Vec<_>>()).unwrap(), | |||
OffsetsBuffer::try_from(repeat(0).take(length + 1).collect::<Vec<_>>()) |
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.
@jaychia FYI I made this fix as a driveby, where the offset buffer should be one element longer than the data array and validity mask.
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.
Hmm odd, this should have been caught be an assert in the constructor. Maybe we need to add one?
4fc736d
to
2a8d6aa
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.
Mostly lgtm, added a few comments. Nice tests!
@@ -129,7 +129,8 @@ impl FullNull for ListArray { | |||
Self::new( | |||
Field::new(name, dtype.clone()), | |||
empty_flat_child, | |||
OffsetsBuffer::try_from(repeat(0).take(length).collect::<Vec<_>>()).unwrap(), | |||
OffsetsBuffer::try_from(repeat(0).take(length + 1).collect::<Vec<_>>()) |
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.
Hmm odd, this should have been caught be an assert in the constructor. Maybe we need to add one?
2a8d6aa
to
b1dc2b5
Compare
This PR adds an
Expression.str.split()
API for splitting strings in string columns on a pattern.Closes #1388