File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -399,13 +399,14 @@ fn visit_arrow_struct_array<V: ArrowArrayVistor>(
399399
400400 let mut columns = Vec :: with_capacity ( array. columns ( ) . len ( ) ) ;
401401
402- for ( ( array, arrow_type ) , iceberg_field) in array
402+ for ( ( array, arrow_field ) , iceberg_field) in array
403403 . columns ( )
404404 . iter ( )
405- . zip_eq ( arrow_struct_fields. iter ( ) . map ( |field| field . data_type ( ) ) )
405+ . zip_eq ( arrow_struct_fields. iter ( ) )
406406 . zip_eq ( iceberg_type. fields ( ) . iter ( ) )
407407 {
408- if array. is_nullable ( ) == iceberg_field. required {
408+ let arrow_type = arrow_field. data_type ( ) ;
409+ if arrow_field. is_nullable ( ) == iceberg_field. required {
409410 return Err ( Error :: new (
410411 ErrorKind :: DataInvalid ,
411412 "The nullable field of arrow struct array is not compatitable with iceberg type" ,
@@ -552,7 +553,7 @@ fn visit_arrow_struct_array_from_field_id<V: ArrowArrayVistor>(
552553 } ;
553554 let array = array. column ( idx) ;
554555 let arrow_type = field. data_type ( ) ;
555- if array . is_nullable ( ) == iceberg_field. required {
556+ if field . is_nullable ( ) == iceberg_field. required {
556557 return Err ( Error :: new (
557558 ErrorKind :: DataInvalid ,
558559 "The nullable field of arrow struct array is not compatitable with iceberg type" ,
You can’t perform that action at this time.
0 commit comments