We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e6c7e7e + 36d556e commit f76c376Copy full SHA for f76c376
datafusion/physical-plan/src/aggregates/group_values/group_column.rs
@@ -592,11 +592,17 @@ impl<B: ByteViewType> ByteViewGroupValueBuilder<B> {
592
593
let views = ScalarBuffer::from(views);
594
595
- Arc::new(GenericByteViewArray::<B>::new(
596
- views,
597
- completed,
598
- null_buffer,
599
- ))
+ // Safety:
+ // * all views were correctly made
+ // * (if utf8): Input was valid Utf8 so buffer contents are
+ // valid utf8 as well
+ unsafe {
600
+ Arc::new(GenericByteViewArray::<B>::new_unchecked(
601
+ views,
602
+ completed,
603
+ null_buffer,
604
+ ))
605
+ }
606
}
607
608
fn take_n_inner(&mut self, n: usize) -> ArrayRef {
0 commit comments