Skip to content

Commit

Permalink
feat: Handle converting Utf8View & BinaryView to Iceberg schema (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipleblanc authored Jan 13, 2025
1 parent c36a487 commit 105e513
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/iceberg/src/arrow/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ fn visit_type<V: ArrowSchemaVisitor>(r#type: &DataType, visitor: &mut V) -> Resu
DataType::Boolean
| DataType::Utf8
| DataType::LargeUtf8
| DataType::Utf8View
| DataType::Binary
| DataType::LargeBinary
| DataType::BinaryView
| DataType::FixedSizeBinary(_)
) =>
{
Expand Down Expand Up @@ -403,7 +405,9 @@ impl ArrowSchemaVisitor for ArrowSchemaConverter {
{
Ok(Type::Primitive(PrimitiveType::TimestamptzNs))
}
DataType::Binary | DataType::LargeBinary => Ok(Type::Primitive(PrimitiveType::Binary)),
DataType::Binary | DataType::LargeBinary | DataType::BinaryView => {
Ok(Type::Primitive(PrimitiveType::Binary))
}
DataType::FixedSizeBinary(width) => {
Ok(Type::Primitive(PrimitiveType::Fixed(*width as u64)))
}
Expand Down

0 comments on commit 105e513

Please sign in to comment.