@@ -8,7 +8,6 @@ use std::sync::Arc;
88use futures:: try_join;
99use itertools:: Itertools ;
1010use vortex_array:: arrays:: StructArray ;
11- use vortex_array:: stats:: Precision ;
1211use vortex_array:: vtable:: ValidityHelper ;
1312use vortex_array:: { ArrayRef , IntoArray , MaskFuture , ToCanonical } ;
1413use vortex_dtype:: { DType , FieldMask , FieldName , Nullability , StructFields } ;
@@ -116,11 +115,6 @@ impl StructReader {
116115 idx
117116 } ;
118117
119- let field_dtype = self
120- . struct_fields ( )
121- . field_by_index ( idx)
122- . ok_or_else ( || vortex_err ! ( "Missing field {idx}" ) ) ?;
123- let name = & self . struct_fields ( ) . names ( ) [ idx] ;
124118 self . lazy_children . get ( child_index)
125119 }
126120
@@ -210,15 +204,15 @@ impl LayoutReader for StructReader {
210204 fn register_splits (
211205 & self ,
212206 field_mask : & [ FieldMask ] ,
213- row_offset : u64 ,
207+ row_range : & Range < u64 > ,
214208 splits : & mut BTreeSet < u64 > ,
215209 ) -> VortexResult < ( ) > {
216210 // In the case of an empty struct, we need to register the end split.
217- splits. insert ( row_offset + self . layout . row_count ) ;
211+ splits. insert ( row_range . end ) ;
218212
219213 self . layout . matching_fields ( field_mask, |mask, idx| {
220214 self . field_reader_by_index ( idx) ?
221- . register_splits ( & [ mask] , row_offset , splits)
215+ . register_splits ( & [ mask] , row_range , splits)
222216 } )
223217 }
224218
0 commit comments