pub enum PhysicalType {
Show 22 variants
Bool,
I8,
I16,
I32,
I64,
U8,
U16,
U32,
U64,
I128,
I256,
F32,
F64,
F128,
Str,
Bytes,
Days32,
Nanos64,
Zoned,
Months32,
ListOffsets,
Struct,
}Expand description
What a vector holds. Fifteen layouts, each one either a fixed stride or an offsets buffer plus a child, so every kernel in perf/02 and every SIMD tier in perf/11 can address them, and so Parquet and Arrow ingest map onto them without a transcode.
No nullability: validity is a separate bitmap and null is never a value in a vector. No precision: that is a check the logical type carries.
Variants§
Bool
One bit per row, packed in words.
I8
I16
I32
I64
U8
U16
U32
U64
I128
16 byte stride. Serves the 128 bit integers and decimals up to 38 digits.
I256
32 byte stride. Serves the 256 bit integers and decimals up to 76 digits.
F32
F64
F128
16 byte stride, computed in software.
Str
Offsets plus an arena.
Bytes
Offsets plus an arena, compared by octet and never dictionary encoded.
Days32
i32 stride: days since 1970-01-01.
Nanos64
i64 stride: nanoseconds, since midnight for a time and since the epoch for a datetime, and the whole of a day-time duration.
Zoned
Two buffers: i64 nanoseconds and an i16 offset in minutes.
Months32
i32 stride: whole months, and nothing else, which is what makes the two duration kinds refuse to mix.
ListOffsets
Offsets plus a child vector.
Struct
Child vectors and no bytes of its own.
Implementations§
Source§impl PhysicalType
impl PhysicalType
Sourcepub fn stride(self) -> Option<usize>
pub fn stride(self) -> Option<usize>
Bytes per value for the fixed stride layouts.
None for Bool, which is bit packed, and for the four layouts
that are offsets or children rather than a stride. A caller that
wants “how much space does a row take” cannot get an answer from
those without the data, and returning a number would be a lie
rather than an approximation.