File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
vortex-array/src/array/struct_ Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ impl StructArray {
5858
5959 pub fn try_new (
6060 names : FieldNames ,
61- fields : Vec < Array > ,
61+ mut fields : Vec < Array > ,
6262 length : usize ,
6363 validity : Validity ,
6464 ) -> VortexResult < Self > {
@@ -81,10 +81,8 @@ impl StructArray {
8181
8282 let validity_metadata = validity. to_metadata ( length) ?;
8383
84- let mut children = Vec :: with_capacity ( fields. len ( ) + 1 ) ;
85- children. extend ( fields) ;
8684 if let Some ( v) = validity. into_array ( ) {
87- children . push ( v) ;
85+ fields . push ( v) ;
8886 }
8987
9088 Self :: try_from_parts (
@@ -94,7 +92,7 @@ impl StructArray {
9492 validity : validity_metadata,
9593 } ) ,
9694 None ,
97- Some ( children . into ( ) ) ,
95+ Some ( fields . into ( ) ) ,
9896 StatsSet :: default ( ) ,
9997 )
10098 }
You can’t perform that action at this time.
0 commit comments