File tree Expand file tree Collapse file tree
kernel/examples/inspect-table/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ impl LogVisitor {
8686 let mut it = NAMES_AND_TYPES . as_ref ( ) . 0 . iter ( ) . enumerate ( ) . peekable ( ) ;
8787 while let Some ( ( start, col) ) = it. next ( ) {
8888 let mut end = start + 1 ;
89+ // move forward while the top level struct has the same name
8990 while it. next_if ( |( _, other) | col[ 0 ] == other[ 0 ] ) . is_some ( ) {
9091 end += 1 ;
9192 }
@@ -104,9 +105,10 @@ impl RowVisitor for LogVisitor {
104105 NAMES_AND_TYPES . as_ref ( )
105106 }
106107 fn visit < ' a > ( & mut self , row_count : usize , getters : & [ & ' a dyn GetData < ' a > ] ) -> DeltaResult < ( ) > {
107- if getters. len ( ) != 55 {
108+ let expected = NAMES_AND_TYPES . as_ref ( ) . 0 . len ( ) ;
109+ if getters. len ( ) != expected {
108110 return Err ( Error :: InternalError ( format ! (
109- "Wrong number of LogVisitor getters: {}" ,
111+ "Wrong number of LogVisitor getters: {}, expected {expected} " ,
110112 getters. len( )
111113 ) ) ) ;
112114 }
You can’t perform that action at this time.
0 commit comments