Skip to content

Commit

Permalink
Replace use of deprecated method, mark roundtrip as todo
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Jan 20, 2025
1 parent 5cdfa3f commit 81594d9
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions parquet/src/arrow/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2222,17 +2222,16 @@ mod tests {
)
.with_extension_type(Uuid)]);

let parquet_schema = arrow_to_parquet_schema(&arrow_schema)?;
let parquet_schema = ArrowSchemaConverter::new().convert(&arrow_schema)?;

assert_eq!(
parquet_schema.column(0).logical_type(),
Some(LogicalType::Uuid)
);

let arrow_schema = parquet_to_arrow_schema(&parquet_schema, None)?;
dbg!(&arrow_schema);

assert_eq!(arrow_schema.field(0).try_extension_type::<Uuid>()?, Uuid);
// TODO: roundtrip
// let arrow_schema = parquet_to_arrow_schema(&parquet_schema, None)?;
// assert_eq!(arrow_schema.field(0).try_extension_type::<Uuid>()?, Uuid);

Ok(())
}
Expand All @@ -2244,20 +2243,19 @@ mod tests {
Field::new("json", DataType::Utf8, false).with_extension_type(Json::default())
]);

let parquet_schema = arrow_to_parquet_schema(&arrow_schema)?;
let parquet_schema = ArrowSchemaConverter::new().convert(&arrow_schema)?;

assert_eq!(
parquet_schema.column(0).logical_type(),
Some(LogicalType::Json)
);

let arrow_schema = parquet_to_arrow_schema(&parquet_schema, None)?;
dbg!(&arrow_schema);

assert_eq!(
arrow_schema.field(0).try_extension_type::<Json>()?,
Json::default()
);
// TODO: roundtrip
// let arrow_schema = parquet_to_arrow_schema(&parquet_schema, None)?;
// assert_eq!(
// arrow_schema.field(0).try_extension_type::<Json>()?,
// Json::default()
// );

Ok(())
}
Expand Down

0 comments on commit 81594d9

Please sign in to comment.