Expand description
A type system for Vortex.
This crate contains the core logical type system for Vortex, including the definition of data types, and (optionally) logic for their serialization and deserialization.
Vortex dtypes are logical domains, not physical layouts. Encodings are tracked separately on arrays, so the same dtype may be backed by canonical buffers, dictionary codes, compressed children, or a lazy expression array.
Every non-null logical dtype carries Nullability directly. This differs from Apache Arrow,
where nullability is usually field metadata.
Re-exports§
pub use half;
Modules§
- arrow
- Convert between Vortex
crate::dtype::DTypeand Apache Arrowarrow_schema::DataType. - extension
- Extension DTypes, and interfaces for working with extension types.
- flatbuffers
- Flatbuffer representations for DTypes
- proto
- Protocol buffer representations for DTypes
- serde
- Serde serialization and deserialization for DTypes
- session
- Module for managing extension dtypes in a Vortex session.
Macros§
- field_
path - A helpful constructor for creating
FieldPaths to nested struct fields of the formatfield_path!(x.y.z) - match_
each_ float_ ptype - Macro to match over each floating point type, binding the corresponding native type (from
NativePType) - match_
each_ integer_ ptype - Macro to match over each integer PType, binding the corresponding native type (from
NativePType) - match_
each_ native_ ptype - Macro to match over each PType, binding the corresponding native type (from
NativePType) - match_
each_ native_ simd_ ptype - Macro to match over each SIMD capable
PType, binding the corresponding native type (fromNativePType) - match_
each_ signed_ integer_ ptype - Macro to match over each signed integer type, binding the corresponding native type (from
NativePType) - match_
each_ unsigned_ integer_ ptype - Macro to match over each unsigned integer type, binding the corresponding native type (from
NativePType) - match_
smallest_ offset_ type - Macro to match the smallest offset type for a given value
Structs§
- DecimalD
Type - Parameters that define the precision and scale of a decimal type.
- FieldD
Type - DType of a struct’s field, either owned or a pointer to an underlying flatbuffer.
- Field
Name - A name for a field in a struct.
- Field
Names - An ordered list of field names in a struct.
- Field
Names Into Iter - Owned iterator of field names.
- Field
Names Iter - Iterator of references to field names.
- Field
Path - A sequence of field selectors representing a path through zero or more layers of
DType. - Field
Path Set - A set of field paths supporting efficient
containsqueries. - Precision
Scale - A struct representing the precision and scale of a decimal type, to be represented
by the native type
D. - Struct
Fields - Type information for a struct column.
- i256
- Signed 256-bit integer type.
Enums§
- DType
- The logical types of elements in Vortex arrays.
- Decimal
Type - Type of the decimal values.
- Field
- Selects a nested type within either a struct or a list.
- Field
Mask - A projection of fields under a layout.
- Nullability
- Whether an instance of a DType can be `null or not
- PType
- Physical type enum, represents the in-memory physical layout but might represent a different logical type.
Constants§
- MAX_
PRECISION - The maximum precision allowed for a decimal type.
- MAX_
SCALE - The maximum scale allowed for a decimal type.
Traits§
- BigCast
- Checked numeric casts up to and including i256 support.
- Decimal
Type Downcast - Trait for downcasting decimal values to native integer types.
- Decimal
Type Upcast - Trait for upcasting native integer types to decimal values.
- From
Primitive OrF16 - A trait for types that can be created from primitive values, including f16.
- IntegerP
Type - Trait for integer primitive types that can be used as indices, offsets, or codes.
- NativeD
Type - This trait is implemented by native Rust types that can be converted
to and from Vortex scalar values.
e.g.
&str->DType::Utf8bool->DType::Bool - Native
Decimal Type - Type of decimal scalar values.
- NativeP
Type - A trait for native Rust types that correspond 1:1 to a PType.
- PType
Downcast - A visitor trait for converting a
NativePTypeto another parameterized type. - PType
Downcast Ext - Extension trait to provide generic downcasting for
PTypeDowncast. - PType
Upcast - A visitor trait for converting a generic
NativePTypeinto a non-parameterized type. - PhysicalP
Type - A trait that allows conversion from a PType to its physical representation (i.e., unsigned)
- ToBytes
- A trait for types that can be converted to a little-endian byte slice
- ToI256
- Types that can potentially be converted to an
i256. - TryFrom
Bytes - A trait for types that can be converted from a little-endian byte slice
- UnsignedP
Type - Trait for unsigned integer primitive types used where non-negative values are required.