File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
vortex-array/src/arrays/listview Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -142,12 +142,17 @@ impl ListViewArray {
142142 let elements =
143143 unsafe { ChunkedArray :: new_unchecked ( chunks, element_dtype. as_ref ( ) . clone ( ) ) } ;
144144
145- ListViewArray :: new (
146- elements. to_canonical ( ) . into_array ( ) ,
147- offsets,
148- sizes,
149- self . validity . clone ( ) ,
150- )
145+ // SAFETY: elements are contiguous, offsets and sizes hand-built to be zero copy
146+ // to list.
147+ unsafe {
148+ ListViewArray :: new_unchecked (
149+ elements. to_canonical ( ) . into_array ( ) ,
150+ offsets,
151+ sizes,
152+ self . validity . clone ( ) ,
153+ )
154+ . with_zero_copy_to_list ( true )
155+ }
151156 }
152157
153158 /// Rebuilds a [`ListViewArray`] by trimming any unused / unreferenced leading and trailing
You can’t perform that action at this time.
0 commit comments