pub struct Dictionary<K, V>(/* private fields */);
Expand description
Wrapper denoting an Arrow Dictionary column with key type K
and values of V
.
The inner value is intentionally not exposed. Construct with Dictionary::new
and access the contained value via Dictionary::value
or Dictionary::into_value
.
This prevents accidental reliance on representation details (e.g., raw keys) and keeps the API focused on appending logical values. The builder handles interning to keys.
Implementations§
Source§impl<K, V> Dictionary<K, V>
impl<K, V> Dictionary<K, V>
Trait Implementations§
Source§impl<K, const N: usize> ArrowBinding for Dictionary<K, [u8; N]>
impl<K, const N: usize> ArrowBinding for Dictionary<K, [u8; N]>
Source§type Builder = FixedSizeBinaryDictionaryBuilder<<K as DictKey>::ArrowKey>
type Builder = FixedSizeBinaryDictionaryBuilder<<K as DictKey>::ArrowKey>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, LargeBinary>
impl<K> ArrowBinding for Dictionary<K, LargeBinary>
Source§type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericBinaryType<i64>>
type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericBinaryType<i64>>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, LargeUtf8>
impl<K> ArrowBinding for Dictionary<K, LargeUtf8>
Source§type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericStringType<i64>>
type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericStringType<i64>>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, String>
impl<K> ArrowBinding for Dictionary<K, String>
Source§type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericStringType<i32>>
type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericStringType<i32>>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, Vec<u8>>
impl<K> ArrowBinding for Dictionary<K, Vec<u8>>
Source§type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericBinaryType<i32>>
type Builder = GenericByteDictionaryBuilder<<K as DictKey>::ArrowKey, GenericBinaryType<i32>>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, f32>
impl<K> ArrowBinding for Dictionary<K, f32>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Float32Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Float32Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, f64>
impl<K> ArrowBinding for Dictionary<K, f64>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Float64Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Float64Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, i16>
impl<K> ArrowBinding for Dictionary<K, i16>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int16Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int16Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, i32>
impl<K> ArrowBinding for Dictionary<K, i32>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int32Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int32Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, i64>
impl<K> ArrowBinding for Dictionary<K, i64>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int64Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int64Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, i8>
impl<K> ArrowBinding for Dictionary<K, i8>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int8Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, Int8Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, u16>
impl<K> ArrowBinding for Dictionary<K, u16>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt16Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt16Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, u32>
impl<K> ArrowBinding for Dictionary<K, u32>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt32Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt32Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, u64>
impl<K> ArrowBinding for Dictionary<K, u64>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt64Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt64Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Source§impl<K> ArrowBinding for Dictionary<K, u8>
impl<K> ArrowBinding for Dictionary<K, u8>
Source§type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt8Type>
type Builder = PrimitiveDictionaryBuilder<<K as DictKey>::ArrowKey, UInt8Type>
Concrete Arrow builder type used for this Rust type.
Source§type Array = DictionaryArray<<K as DictKey>::ArrowKey>
type Array = DictionaryArray<<K as DictKey>::ArrowKey>
Concrete Arrow array type produced by
finish
.Source§fn new_builder(_capacity: usize) -> Self::Builder
fn new_builder(_capacity: usize) -> Self::Builder
Create a new builder with an optional capacity hint.
Source§fn append_value(b: &mut Self::Builder, v: &Self)
fn append_value(b: &mut Self::Builder, v: &Self)
Append a non-null value to the builder.
Source§fn append_null(b: &mut Self::Builder)
fn append_null(b: &mut Self::Builder)
Append a null to the builder.
Auto Trait Implementations§
impl<K, V> Freeze for Dictionary<K, V>where
V: Freeze,
impl<K, V> RefUnwindSafe for Dictionary<K, V>where
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, V> Send for Dictionary<K, V>
impl<K, V> Sync for Dictionary<K, V>
impl<K, V> Unpin for Dictionary<K, V>
impl<K, V> UnwindSafe for Dictionary<K, V>where
V: UnwindSafe,
K: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more