Skip to content

Commit

Permalink
refine code and add more test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZENOTME committed Oct 27, 2023
1 parent 613b409 commit efeb59d
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 98 deletions.
7 changes: 2 additions & 5 deletions crates/iceberg/src/avro/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,7 @@ pub(crate) fn avro_decimal_schema(precision: usize, scale: usize) -> Result<Avro
Ok(AvroSchema::Decimal(DecimalSchema {
precision,
scale,
inner: Box::new(avro_fixed_schema(
Type::decimal_required_bytes(precision as u32)? as usize,
None,
)?),
inner: Box::new(AvroSchema::Bytes),
}))
}

Expand Down Expand Up @@ -471,7 +468,7 @@ impl AvroSchemaVisitor for AvroSchemaToSchema {
)
})?;
match logical_type {
"uuid" => Type::Primitive(PrimitiveType::Uuid),
UUID_LOGICAL_TYPE => Type::Primitive(PrimitiveType::Uuid),
ty => {
return Err(Error::new(
ErrorKind::FeatureUnsupported,
Expand Down
Loading

0 comments on commit efeb59d

Please sign in to comment.