@@ -389,7 +389,7 @@ mod tests {
389
389
async fn test_parquet_writer_with_complex_schema ( ) -> Result < ( ) > {
390
390
let temp_dir = TempDir :: new ( ) . unwrap ( ) ;
391
391
let file_io = FileIOBuilder :: new_fs_io ( ) . build ( ) . unwrap ( ) ;
392
- let loccation_gen =
392
+ let location_gen =
393
393
MockLocationGenerator :: new ( temp_dir. path ( ) . to_str ( ) . unwrap ( ) . to_string ( ) ) ;
394
394
let file_name_gen =
395
395
DefaultFileNameGenerator :: new ( "test" . to_string ( ) , None , DataFileFormat :: Parquet ) ;
@@ -410,7 +410,11 @@ mod tests {
410
410
"sub_col" ,
411
411
arrow_schema:: DataType :: Int64 ,
412
412
true ,
413
- ) ]
413
+ )
414
+ . with_metadata( HashMap :: from( [ (
415
+ PARQUET_FIELD_ID_META_KEY . to_string( ) ,
416
+ "-1" . to_string( ) ,
417
+ ) ] ) ) ]
414
418
. into( ) ,
415
419
) ,
416
420
true ,
@@ -424,11 +428,13 @@ mod tests {
424
428
) ,
425
429
arrow_schema:: Field :: new(
426
430
"col3" ,
427
- arrow_schema:: DataType :: List ( Arc :: new( arrow_schema:: Field :: new(
428
- "item" ,
429
- arrow_schema:: DataType :: Int64 ,
430
- true ,
431
- ) ) ) ,
431
+ arrow_schema:: DataType :: List ( Arc :: new(
432
+ arrow_schema:: Field :: new( "item" , arrow_schema:: DataType :: Int64 , true )
433
+ . with_metadata( HashMap :: from( [ (
434
+ PARQUET_FIELD_ID_META_KEY . to_string( ) ,
435
+ "-1" . to_string( ) ,
436
+ ) ] ) ) ,
437
+ ) ) ,
432
438
true ,
433
439
)
434
440
. with_metadata( HashMap :: from( [ (
@@ -445,11 +451,19 @@ mod tests {
445
451
"sub_sub_col" ,
446
452
arrow_schema:: DataType :: Int64 ,
447
453
true ,
448
- ) ]
454
+ )
455
+ . with_metadata( HashMap :: from( [ (
456
+ PARQUET_FIELD_ID_META_KEY . to_string( ) ,
457
+ "-1" . to_string( ) ,
458
+ ) ] ) ) ]
449
459
. into( ) ,
450
460
) ,
451
461
true ,
452
- ) ]
462
+ )
463
+ . with_metadata( HashMap :: from( [ (
464
+ PARQUET_FIELD_ID_META_KEY . to_string( ) ,
465
+ "-1" . to_string( ) ,
466
+ ) ] ) ) ]
453
467
. into( ) ,
454
468
) ,
455
469
true ,
@@ -519,7 +533,7 @@ mod tests {
519
533
WriterProperties :: builder ( ) . build ( ) ,
520
534
to_write. schema ( ) ,
521
535
file_io. clone ( ) ,
522
- loccation_gen ,
536
+ location_gen ,
523
537
file_name_gen,
524
538
)
525
539
. build ( )
0 commit comments