-
Notifications
You must be signed in to change notification settings - Fork 223
Conversation
53548b3
to
7ed66f7
Compare
@TethysSvensson (that mentioned this gap in the API out of band), was something like this that you had in mind? |
Codecov ReportBase: 83.14% // Head: 83.06% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1260 +/- ##
==========================================
- Coverage 83.14% 83.06% -0.08%
==========================================
Files 359 361 +2
Lines 38152 38370 +218
==========================================
+ Hits 31720 31872 +152
- Misses 6432 6498 +66
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@jorgecarleitao Yep, this looks exactly like what I need! |
7ed66f7
to
3bfad2c
Compare
3bfad2c
to
b8d5624
Compare
One operation I might be missing with this PR is the ability to efficiently extend array into another. I.e. a function with this signature: impl MutableUtf8ValuesArray {
fn extend(&mut self, other: &MutableUtf8ValuesArray);
} |
65377eb
to
301cdaf
Compare
301cdaf
to
9510c77
Compare
9510c77
to
067d2ec
Compare
@TethysSvensson just pushed a commit adding #[test]
fn extend_from_iter() {
let offsets = vec![0, 2];
let values = b"ab".to_vec();
let mut b = MutableUtf8ValuesArray::<i32>::try_new(DataType::Utf8, offsets, values).unwrap();
b.extend_trusted_len(vec!["a", "b"].into_iter());
let a = b.clone();
b.extend_trusted_len(a.iter());
let offsets = vec![0, 2, 3, 4, 6, 7, 8];
let values = b"abababab".to_vec();
assert_eq!(
b.as_box(),
MutableUtf8ValuesArray::<i32>::try_new(DataType::Utf8, offsets, values)
.unwrap()
.as_box()
)
} |
@jorgecarleitao Is there anything missing before this can be merged? Is there something I can help with? |
was sick during the weekend, so could not move this through. Merged! |
This is the always-valid counterpart of
MutableUtf8Array
. Useful to create "required" arrays.