pub enum IcebergType {
Show 17 variants
Boolean,
Int,
Long,
Float,
Double,
Decimal(u32, u32),
Date,
Time,
Timestamp,
Timestamptz,
String,
Uuid,
Fixed(u64),
Binary,
Struct(Vec<IcebergField>),
List {
element: Box<IcebergType>,
element_required: bool,
},
Map {
key: Box<IcebergType>,
value: Box<IcebergType>,
value_required: bool,
},
}Variants§
Boolean
Int
Long
Float
Double
Decimal(u32, u32)
Date
Time
Microsecond precision, time of day, no date/timezone.
Timestamp
Microsecond precision, without timezone.
Timestamptz
Microsecond precision, with timezone (stored internally as UTC).
String
Uuid
Fixed(u64)
Fixed-length byte array of length L.
Binary
Variable-length byte array.
Struct(Vec<IcebergField>)
List
Map
Implementations§
Source§impl IcebergType
impl IcebergType
Sourcepub fn primitive_name(&self) -> Option<String>
pub fn primitive_name(&self) -> Option<String>
The type name as it appears in Iceberg’s JSON schema representation
(primitives are bare strings; struct/list/map are objects,
matching how a real Iceberg schema is expressed - not shown here as
JSON since field-ID assignment is the caller’s job, but the
primitive name is stable and useful on its own).
Sourcepub fn from_arrow_type(dt: &DataType) -> Self
pub fn from_arrow_type(dt: &DataType) -> Self
Infers the Iceberg type for an Arrow [DataType]. Nested types
recurse into genuine struct/list/map shapes with placeholder
field IDs (0) - see the module doc comment.
Sourcepub fn to_arrow_type(&self) -> DataType
pub fn to_arrow_type(&self) -> DataType
The Arrow type this Iceberg type round-trips through.
pub fn from_pg_type(pg: &PgType) -> Self
pub fn to_pg_type(&self) -> PgType
Trait Implementations§
Source§impl Clone for IcebergType
impl Clone for IcebergType
Source§fn clone(&self) -> IcebergType
fn clone(&self) -> IcebergType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IcebergType
impl Debug for IcebergType
Source§impl PartialEq for IcebergType
impl PartialEq for IcebergType
impl StructuralPartialEq for IcebergType
Auto Trait Implementations§
impl Freeze for IcebergType
impl RefUnwindSafe for IcebergType
impl Send for IcebergType
impl Sync for IcebergType
impl Unpin for IcebergType
impl UnwindSafe for IcebergType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more