pub enum CategoricalArrayToArrowConverter {
Categorical {
mapping: Arc<CategoricalMapping>,
key_remap: CategoricalKeyRemap,
},
Enum {
mapping: Arc<CategoricalMapping>,
frozen: Arc<FrozenCategories>,
},
}
Variants§
Categorical
Enum
Enum keys are not remapped, but we still track this variant to support
the build_values_array()
function.
Implementations§
Source§impl CategoricalArrayToArrowConverter
impl CategoricalArrayToArrowConverter
Sourcepub fn build_values_array(&self, compat_level: CompatLevel) -> Box<dyn Array>
pub fn build_values_array(&self, compat_level: CompatLevel) -> Box<dyn Array>
Build the values array of the dictionary:
- If
Self
is::Categorical
, this builds according to the currentkey_remap
state:- If
persist_remap
istrue
, this state will hold all the keys this converter has encountered. It will otherwise hold only the keys seen from the lastarray_to_arrow()
call.
- If
- If
Self
is::Enum
, this returns the full set of values present in the Enum’sFrozenCategories
.
Auto Trait Implementations§
impl Freeze for CategoricalArrayToArrowConverter
impl RefUnwindSafe for CategoricalArrayToArrowConverter
impl Send for CategoricalArrayToArrowConverter
impl Sync for CategoricalArrayToArrowConverter
impl Unpin for CategoricalArrayToArrowConverter
impl UnwindSafe for CategoricalArrayToArrowConverter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more