@@ -20,9 +20,6 @@ use crate::{CHUNKED_LAYOUT_ID, LayoutId};
2020pub struct ChunkedLayout ;
2121
2222/// In-memory representation of Chunked layout.
23- ///
24- /// First child in the list is the metadata table
25- /// Subsequent children are consecutive chunks of this layout
2623impl LayoutVTable for ChunkedLayout {
2724 fn id ( & self ) -> LayoutId {
2825 CHUNKED_LAYOUT_ID
@@ -44,9 +41,8 @@ impl LayoutVTable for ChunkedLayout {
4441 row_offset : u64 ,
4542 splits : & mut BTreeSet < u64 > ,
4643 ) -> VortexResult < ( ) > {
47- let nchunks = layout. nchildren ( ) - ( if layout. metadata ( ) . is_some ( ) { 1 } else { 0 } ) ;
4844 let mut offset = row_offset;
49- for i in 0 ..nchunks {
45+ for i in 0 ..layout . nchildren ( ) {
5046 let child = layout. child ( i, layout. dtype ( ) . clone ( ) , format ! ( "[{}]" , i) ) ?;
5147 child. register_splits ( field_mask, offset, splits) ?;
5248 offset += child. row_count ( ) ;
@@ -63,9 +59,8 @@ impl LayoutVTable for ChunkedLayout {
6359 projection_field_mask : & [ FieldMask ] ,
6460 segments : & mut SegmentCollector ,
6561 ) -> VortexResult < ( ) > {
66- let nchunks = layout. nchildren ( ) - ( if layout. metadata ( ) . is_some ( ) { 1 } else { 0 } ) ;
6762 let mut offset = row_offset;
68- for i in 0 ..nchunks {
63+ for i in 0 ..layout . nchildren ( ) {
6964 let child = layout. child ( i, layout. dtype ( ) . clone ( ) , format ! ( "[{i}]" ) ) ?;
7065 child. required_segments ( offset, filter_field_mask, projection_field_mask, segments) ?;
7166 offset += child. row_count ( ) ;
0 commit comments