Dictionary

Struct Dictionary 

Source
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>

Source

pub fn new(value: V) -> Self

Create a new dictionary value wrapper.

Source

pub fn value(&self) -> &V

Borrow the contained logical value.

Source

pub fn into_value(self) -> V

Consume and return the contained logical value.

Trait Implementations§

Source§

impl<K, const N: usize> ArrowBinding for Dictionary<K, [u8; N]>

Source§

type Builder = FixedSizeBinaryDictionaryBuilder<<K as DictKey>::ArrowKey>

Concrete Arrow builder type used for this Rust type.
Source§

type Array = DictionaryArray<<K as DictKey>::ArrowKey>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, LargeBinary>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, LargeUtf8>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, String>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, Vec<u8>>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, f32>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, f64>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, i16>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, i32>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, i64>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, i8>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, u16>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, u32>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, u64>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K> ArrowBinding for Dictionary<K, u8>

Source§

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>

Concrete Arrow array type produced by finish.
Source§

fn data_type() -> DataType

The Arrow DataType corresponding to this Rust type.
Source§

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)

Append a non-null value to the builder.
Source§

fn append_null(b: &mut Self::Builder)

Append a null to the builder.
Source§

fn finish(b: Self::Builder) -> Self::Array

Finish the builder and produce a typed Arrow array.
Source§

impl<K, V> From<V> for Dictionary<K, V>

Source§

fn from(value: V) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<K, V> Freeze for Dictionary<K, V>
where V: Freeze,

§

impl<K, V> RefUnwindSafe for Dictionary<K, V>

§

impl<K, V> Send for Dictionary<K, V>
where V: Send, K: Send,

§

impl<K, V> Sync for Dictionary<K, V>
where V: Sync, K: Sync,

§

impl<K, V> Unpin for Dictionary<K, V>
where V: Unpin, K: Unpin,

§

impl<K, V> UnwindSafe for Dictionary<K, V>
where V: UnwindSafe, K: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,