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>(
399
399
400
400
let mut columns = Vec :: with_capacity ( array. columns ( ) . len ( ) ) ;
401
401
402
- for ( ( array, arrow_type ) , iceberg_field) in array
402
+ for ( ( array, arrow_field ) , iceberg_field) in array
403
403
. columns ( )
404
404
. iter ( )
405
- . zip_eq ( arrow_struct_fields. iter ( ) . map ( |field| field . data_type ( ) ) )
405
+ . zip_eq ( arrow_struct_fields. iter ( ) )
406
406
. zip_eq ( iceberg_type. fields ( ) . iter ( ) )
407
407
{
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 {
409
410
return Err ( Error :: new (
410
411
ErrorKind :: DataInvalid ,
411
412
"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>(
552
553
} ;
553
554
let array = array. column ( idx) ;
554
555
let arrow_type = field. data_type ( ) ;
555
- if array . is_nullable ( ) == iceberg_field. required {
556
+ if field . is_nullable ( ) == iceberg_field. required {
556
557
return Err ( Error :: new (
557
558
ErrorKind :: DataInvalid ,
558
559
"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