Expand description
§Aliases & View Tuples - Lightweight Tuple Views and Fast-To-Type Aliases
Aliases for convenience and lightweight view tuple types used across the crate.
§What’s here
- Record batch names:
RecordBatch->Table,ChunkedTable->SuperTable. - Window metadata:
OffsetandLengthfor logical row ranges; plus helpers likeDictLengthandBytesLengthfor dictionary and string buffers. - Zero-copy views: Compact
(..., Offset, Length)View-Tuple (VT) tuples (e.g.ArrayVT,BitmaskVT,StringAVT) that carry a reference to the source plus a window, without allocating. - Ergonomic column aliases: Short forms like
IntArr,FltArr,StrArr, etc. for those such inclined.
§Why it exists
Many APIs only need “where to look” (offset/len) and “what to look at” (a reference). These aliases centralise the naming and keep signatures short, while remaining zero-copy.
§Picking a view
- Use
ArrayV(full view struct) when you want methods (typed access, null counts, etc.). - Use VT tuples (e.g.
(&Array, Offset, Length)) for the lightest possible window with no extra behavior. For inner array types, only the Array View Tuples (AVT) are provided to avoid lots of boilerplate redundancy polluting the main library and binary size. - For fixed-width primitives you can often use native slices (
&[T]) directly; VT types are provided for consistency where needed.
§Feature gates
Some aliases are enabled only when relevant features are on (e.g. datetime, views, cube, chunked).
§Notes
All offsets/lengths are logical row counts unless specified otherwise (e.g. BytesLength).
These helpers do not copy data and are safe to clone cheaply.
Type Aliases§
- ArrayVT
- Windowed View Tuple for Array, when one isn’t using the
full
ArrayViewabstraction, doesn’t want to use it, couple a function signature to it or doesn’t have that feature enabled. - BitmaskVT
- Windowed View Tuple for Bitmask
- BoolArr
- BooleanAVT
- Logical windowed Array View Tuple over a Boolean array.
- Bytes
Length - Raw bytes data length for a
StringArray - CatArr
- CategoricalAVT
- Logical windowed Array View Tuple over a categorical array.
- CategoricalAVT
Ext - Logical windowed Array View Tuple over a categorical array, including dictionary length.
- Chunked
Table - ChunkedTable
- Dict
Length - Dictionary field length for a
DictionaryArray - FA
- FieldAVT
- Logical windowed Array View Tuple over an
Arrayand itsField: ((array, offset, len), field). - FloatAVT
- Logical windowed Array View Tuple over a primitive float array.
- FltArr
- IntArr
- IntegerAVT
- Logical windowed Array View Tuple over a primitive integer array.
- Length
- The logical length of the
ArrayView. Set toarr.len()for the whole set. - Offset
- The
ArrayViewoffset lower bound, for a windowed view. Set to0for the whole set. - Record
Batch - RecordBatch
- StrArr
- StringAVT
- Logical windowed Array View Tuple over a UTF-8 string array.
- StringAVT
Ext - Logical windowed Array View Tuple over a UTF-8 string array, including byte length.