Skip to content

Commit 4cccb15

Browse files
committed
fix typo
1 parent 5fdfa89 commit 4cccb15

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

crates/iceberg/src/writer/file_writer/parquet_writer.rs

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ mod tests {
389389
async fn test_parquet_writer_with_complex_schema() -> Result<()> {
390390
let temp_dir = TempDir::new().unwrap();
391391
let file_io = FileIOBuilder::new_fs_io().build().unwrap();
392-
let loccation_gen =
392+
let location_gen =
393393
MockLocationGenerator::new(temp_dir.path().to_str().unwrap().to_string());
394394
let file_name_gen =
395395
DefaultFileNameGenerator::new("test".to_string(), None, DataFileFormat::Parquet);
@@ -410,7 +410,11 @@ mod tests {
410410
"sub_col",
411411
arrow_schema::DataType::Int64,
412412
true,
413-
)]
413+
)
414+
.with_metadata(HashMap::from([(
415+
PARQUET_FIELD_ID_META_KEY.to_string(),
416+
"-1".to_string(),
417+
)]))]
414418
.into(),
415419
),
416420
true,
@@ -424,11 +428,13 @@ mod tests {
424428
),
425429
arrow_schema::Field::new(
426430
"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+
)),
432438
true,
433439
)
434440
.with_metadata(HashMap::from([(
@@ -445,11 +451,19 @@ mod tests {
445451
"sub_sub_col",
446452
arrow_schema::DataType::Int64,
447453
true,
448-
)]
454+
)
455+
.with_metadata(HashMap::from([(
456+
PARQUET_FIELD_ID_META_KEY.to_string(),
457+
"-1".to_string(),
458+
)]))]
449459
.into(),
450460
),
451461
true,
452-
)]
462+
)
463+
.with_metadata(HashMap::from([(
464+
PARQUET_FIELD_ID_META_KEY.to_string(),
465+
"-1".to_string(),
466+
)]))]
453467
.into(),
454468
),
455469
true,
@@ -519,7 +533,7 @@ mod tests {
519533
WriterProperties::builder().build(),
520534
to_write.schema(),
521535
file_io.clone(),
522-
loccation_gen,
536+
location_gen,
523537
file_name_gen,
524538
)
525539
.build()

0 commit comments

Comments
 (0)