Skip to main content

Module status

Module status 

Source
Expand description

§Status

The page documents the supported types both from an Arrow and a Rust perspective.

§Arrow data types

§Rust types

§Native / standard types

  • bool
  • i8, i16, i32, i64
  • u8, u16, u32, u64
  • f32, f64
  • char: serialized as u32
  • Option<T>: if T is supported
  • (): serialized as a missing value, Option<()> is always deserialized as None
  • struct S{ .. }: if the fields are supported
  • Vec<T>: if T is supported. Any type that serializes into a Serde sequence is supported
  • HashMap<K, V>, BTreeMap<K, V> and similar map types are supported if K and V are supported
  • tuples: tuples or tuple structs are not yet supported. It is planned to map them to struct arrays with numeric field names
  • enum ... { }: enums are mapped to union arrays. At the moment options of unions are not supported. Also unions with more than 127 variants are not supported. All types of union variants (unit, newtype, tuple, struct) are supported
  • struct S(T): newtype structs are supported, if T is supported

§chrono types

§chrono::DateTime<Utc>
  • is serialized / deserialized as strings
  • can be mapped to Utf8, LargeUtf8, Timestamp(.., Some("UTC"))
  • from_samples detects
    • LargeUtf8 without configuration
    • Timestamp(Millisecond, Some("UTC")) when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing

With chrono::serde::ts_microseconds:

  • is serialized / deserialized as i64
  • can be mapped to Utf8, LargeUtf8, Timestamp(.., Some("UTC"))
  • from_samples and from_type detect Int64
§chrono::NaiveDateTime
  • is serialized / deserialized as strings
  • can be mapped to Utf8, LargeUtf8, Timestamp(.., None)
  • from_samples detects
    • LargeUtf8 without configuration
    • Timestamp(Millisecond, None) when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing
§chrono::NaiveTime
  • serialized / deserialized as strings
  • can be mapped to Utf8, LargeUtf8, Time32(..) and Time64 arrays
  • from_samples detects
    • LargeUtf8 without configuration
    • Time64(Nanosecond) when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing
§chrono::NaiveDate
  • is serialized as Serde strings
  • can be mapped to Utf8, LargeUtf8, Date32 arrays
  • from_samples detects
    • LargeUtf8 without configuration
    • Date32 when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing

chrono::Duration does not support Serde and is therefore not supported

§jiff types

§jiff::Date
  • is serialized as Serde strings
  • can me mapped to Utf8, LargeUtf8, Date32
  • from_samples detects
    • LargeUtf8 without configuration
    • Date32 when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing
§jiff::Time
  • is serialized as Serde strings
  • can me mapped to Utf8, LargeUtf8, Time32(..), Time64(..)
  • from_samples detects
    • LargeUtf8 without configuration
    • Time64(Nanosecond) when setitng guess_dates = true
  • from_type is not supported, as the type is not self-describing
§jiff::DateTime
  • is serialized as Serde strings
  • can me mapped to Utf8, LargeUtf8, Timestmap(.., None)
  • from_samples detects
    • LargeUtf8 without configuration
    • Timestamp(Millisecond, None) when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing
§jiff::Timestamp
  • is serialized as Serde strings
  • can me mapped to Utf8, LargeUtf8, Timestamp(.., Some("UTC"))
  • from_samples detects
    • LargeUtf8 without configuration
    • Timestamp(Millisecond, Some("UTC")) when setting guess_dates = true
  • from_type is not supported, as the type is not self-describing
§jiff::Span
  • is serialized as Serde strings
  • can me mapped to Utf8, LargeUtf8, Duration(..)
  • from_samples detects LargeUtf8
  • from_type is not supported, as the type is not self-describing
§jiff::SignedDuration

Same as jiff::Span

§jiff::Zoned

is not supported as there is no clear way of implementation

§rust_decimal::Decimal

  • for the float and str (de)serialization options when using the Decimal128(..) data type

§bigdecimal::BigDecimal

  • when using the Decimal128(..) data type