Skip to content

Commit

Permalink
Merge pull request #1 from alamb/alamb/tweak-group
Browse files Browse the repository at this point in the history
Do not re-validate output is utf8
  • Loading branch information
Rachelint authored Oct 13, 2024
2 parents e6c7e7e + 36d556e commit f76c376
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,17 @@ impl<B: ByteViewType> ByteViewGroupValueBuilder<B> {

let views = ScalarBuffer::from(views);

Arc::new(GenericByteViewArray::<B>::new(
views,
completed,
null_buffer,
))
// Safety:
// * all views were correctly made
// * (if utf8): Input was valid Utf8 so buffer contents are
// valid utf8 as well
unsafe {
Arc::new(GenericByteViewArray::<B>::new_unchecked(
views,
completed,
null_buffer,
))
}
}

fn take_n_inner(&mut self, n: usize) -> ArrayRef {
Expand Down

0 comments on commit f76c376

Please sign in to comment.