#[non_exhaustive]pub enum Data {
Show 16 variants
Empty,
Bool(Buffer<bool>),
Int8(Buffer<i8>),
Int16(Buffer<i16>),
Int32(Buffer<i32>),
Int64(Buffer<i64>),
Int128(Buffer<i128>),
UInt8(Buffer<u8>),
UInt16(Buffer<u16>),
UInt32(Buffer<u32>),
UInt64(Buffer<u64>),
UInt128(Buffer<u128>),
Float32(Buffer<f32>),
Float64(Buffer<f64>),
Interval(Buffer<(i32, i32, i64)>),
Varlen(StringColumn),
}Expand description
The values of a flat vector, one Rust vector per physical type.
The variants are physical rather than logical, which is what lets DATE and INTEGER share
storage and share a kernel. What a run of i32 means is the vector’s logical type’s business.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
No values, for the type of an untyped NULL.
Bool(Buffer<bool>)
One byte per value.
Int8(Buffer<i8>)
8 bit signed.
Int16(Buffer<i16>)
16 bit signed.
Int32(Buffer<i32>)
32 bit signed.
Int64(Buffer<i64>)
64 bit signed.
Int128(Buffer<i128>)
128 bit signed.
UInt8(Buffer<u8>)
8 bit unsigned.
UInt16(Buffer<u16>)
16 bit unsigned.
UInt32(Buffer<u32>)
32 bit unsigned.
UInt64(Buffer<u64>)
64 bit unsigned.
UInt128(Buffer<u128>)
128 bit unsigned.
Float32(Buffer<f32>)
IEEE 754 binary32.
Float64(Buffer<f64>)
IEEE 754 binary64.
Interval(Buffer<(i32, i32, i64)>)
The months, days and microseconds triple.
Varlen(StringColumn)
Strings, as 16 byte views plus the arena the long ones live in.
Implementations§
Source§impl Data
impl Data
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
How many values are stored.
The match below has no wildcard arm, and that is what makes this function the check that
keeps for_each_layout honest. A variant added to this enum
without being added to the all group fails to compile here, which is a line in a build log
rather than a layout quietly missing from six kernels.
Sourcepub fn signed_at(&self, index: usize) -> Option<i128>
pub fn signed_at(&self, index: usize) -> Option<i128>
An integer at index, widened, for any of the signed integer layouts.
Used by the decimal path, which needs the unscaled value out of whichever width the width and scale picked, and by anything else that would otherwise repeat the same five arms.
Sourcepub fn unsigned_at(&self, index: usize) -> Option<u128>
pub fn unsigned_at(&self, index: usize) -> Option<u128>
An unsigned integer at index, widened.