Expand description
Core types for the quiver crate.
You should normally depend on quiver instead of this crate.
quiver_types exists so that the bulk of quiver compiles independently
of the (optional) quiver_derive proc-macro crate.
Re-exports§
Macros§
- newtype_
datatype - Implements
LogicalTypefor a domain newtype, makingColumn<MyType>work — including nesting (List<MyType>), the convenience constructors, and the derive.
Structs§
- AnyBinary
- Marker for a binary column in any of arrow’s byte-string encodings.
- AnyList
- Marker for a list column in any of arrow’s list encodings.
- AnyUtf8
- Marker for a UTF-8 column in any of arrow’s string encodings.
- As
- Adapter for using a foreign type (one you don’t own, so
newtype_datatype!is off-limits by the orphan rule) as a logical column type, stored asRepr: - Binary
- Marker for an arrow
Binarycolumn: variable-length byte strings. - Binary
View - Marker for an arrow
BinaryViewcolumn: likeBinary, in the newer “view” encoding (arrow::array::BinaryViewArray), optimized for comparisons and out-of-order writes. - Column
- A strongly-typed, validated, zero-copy view of one record batch column.
- Column
Desc - Identifies a strongly-typed column by name.
- Column
Into Iter - By-value iterator over the owned values of a
Column, created byColumn::into_iter_owned. - Column
Iter - Iterator over the values of a
Column. - Date32
- Days since the Unix epoch, as an
i32. - Date64
- Milliseconds since the Unix epoch, as an
i64(expected to be a multiple of a day; not validated). - Dictionary
- Marker for an arrow
Dictionarycolumn, e.g.Dictionary<i32, Utf8>. - Duration
- Marker for an arrow
Durationcolumn, e.g.Duration<Nanosecond>. - DynColumn
- A single dynamically-typed column of a record batch: the field description plus the actual data.
- DynColumn
Desc - Identifies a dynamically-typed column by name.
- Error
- An error from converting between a record batch and a
#[derive(Quiver)]struct. - Fixed
Size Binary - Marker for an arrow
FixedSizeBinary(N)column, e.g.FixedSizeBinary<16>for UUIDs. - Fixed
Size List - Marker for an arrow
FixedSizeListcolumn: each element holds exactlyNitems of logical typeL, e.g.FixedSizeList<f32, 3>for 3D positions. - Large
Binary - Marker for an arrow
LargeBinarycolumn: likeBinary, with 64-bit offsets. - Large
List - Marker for an arrow
LargeListcolumn with items of logical typeL: likeList, with 64-bit offsets. - Large
List View - Marker for an arrow
LargeListViewcolumn with items of logical typeL: likeListView, with 64-bit offsets and sizes. - Large
Utf8 - Like
Utf8, with 64-bit offsets (for single columns holding more than 2GiBof text in total). - List
- Marker for an arrow
Listcolumn with items of logical typeL. - List
Value - One list element of a list column (
List,LargeList,FixedSizeList, …): a zero-copy, random-access view of that row’s typed items. - List
View - Marker for an arrow
ListViewcolumn with items of logical typeL: likeList, in the list-view layout (per-row offset + size). - Map
- Marker for an arrow
Mapcolumn from keysKto valuesV, e.g.Map<Utf8, i64>. - MapValue
- One map element of a
Column<Map<K, V>>: an iterator over the typed(key, value)pairs. - Microsecond
- Millisecond
- Nanosecond
- NoTimezone
- Timezone-naive timestamps.
- Run
- Marker for an arrow run-end-encoded column, e.g.
Run<i32, Utf8>. - Second
- Time32
Millisecond - Milliseconds since midnight, as an
i32. - Time32
Second - Seconds since midnight, as an
i32. - Time64
Microsecond - Microseconds since midnight, as an
i64. - Time64
Nanosecond - Nanoseconds since midnight, as an
i64. - Timestamp
- Marker for an arrow
Timestampcolumn, e.g.Timestamp<Nanosecond, Utc>. - Typed
Dictionary - The validated representation of a
Dictionarycolumn: the dictionary array plus its downcast values. - Typed
Fixed Size List - The validated representation of a
FixedSizeListcolumn: the list array plus its downcast values. - Typed
Large List - The validated representation of a
LargeListcolumn: the list array plus its downcast values. - Typed
Large List View - The validated representation of a
LargeListViewcolumn: the list-view array plus its downcast values. - Typed
List - The validated representation of a
Listcolumn: the list array plus its downcast values. - Typed
List View - The validated representation of a
ListViewcolumn: the list-view array plus its downcast values. - Typed
Map - The validated representation of a
Mapcolumn: the map array plus its downcast keys and values. - Typed
Run - The validated representation of a
Runcolumn: the run array plus its downcast values. - Utc
- The “UTC” timezone.
- Utf8
- UTF-8 text: an arrow
DataType::Utf8column withStringvalues. - Utf8
View - Like
Utf8, in the newer “view” encoding (arrow::array::StringViewArray), optimized for comparisons and out-of-order writes.
Enums§
- AnyTyped
Binary - The validated representation of an
AnyBinarycolumn: one of the per-encoding binary arrays. - AnyTyped
List - The validated representation of an
AnyListcolumn: one of the per-encoding typed representations. - AnyTyped
Utf8 - The validated representation of an
AnyUtf8column: one of the per-encoding string arrays. - Column
Error - What can go wrong when constructing a
Column. - Error
Kind - What went wrong when converting between a record batch and a
#[derive(Quiver)]struct.
Traits§
- Concrete
Type - A
LogicalTypethat corresponds to a single concrete arrow datatype, and can therefore be built and used to generate schemas. - Dictionary
Key - A logical type usable as a
Dictionarykey:i8–i64,u8–u64. - Infallible
Build - Marker for logical types whose
ConcreteType::buildcan never fail, making the convenientColumn::from_values(andFrom<Vec<T>>,FromIterator) available. - Logical
Type - A logical column type, e.g.
Utf8,Option<i64>, orList<Utf8>. - Primitive
Type - Logical types whose values are stored in one contiguous buffer of
primitive values, enabling the zero-copy
Column::as_slice. - RefType
- Logical types whose element values can be borrowed as plain references
(
&str,&i64, …), enablingcolumn[index](seeColumn’sIndeximpl). - RunEnd
Type - A logical type usable as a
Runend-index:i16,i32, ori64. - Time
Unit Spec - A
Timestamp/Durationtime unit:Second,Millisecond,Microsecond, orNanosecond. - Timezone
Spec - The timezone of a
Timestamp:NoTimezone,Utc, or your own marker type.