pub struct GroupValuesBytes<O: OffsetSizeTrait> {
map: ArrowBytesMap<O, usize>,
num_groups: usize,
}Expand description
A GroupValues storing single column of Utf8/LargeUtf8/Binary/LargeBinary values
This specialization is significantly faster than using the more general
purpose Rows format
Fields§
§map: ArrowBytesMap<O, usize>Map string/binary values to group index
num_groups: usizeThe total number of groups so far (used to assign group_index)
Implementations§
Source§impl<O: OffsetSizeTrait> GroupValuesBytes<O>
impl<O: OffsetSizeTrait> GroupValuesBytes<O>
pub fn new(output_type: OutputType) -> Self
Trait Implementations§
Source§impl<O: OffsetSizeTrait> GroupValues for GroupValuesBytes<O>
impl<O: OffsetSizeTrait> GroupValues for GroupValuesBytes<O>
Source§fn intern(&mut self, cols: &[ArrayRef], groups: &mut Vec<usize>) -> Result<()>
fn intern(&mut self, cols: &[ArrayRef], groups: &mut Vec<usize>) -> Result<()>
Calculates the group id for each input row of
cols, assigning new
group ids as necessary. Read moreSource§fn size(&self) -> usize
fn size(&self) -> usize
Returns the number of bytes of memory used by this
GroupValuesSource§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns true if this
GroupValues is emptySource§fn len(&self) -> usize
fn len(&self) -> usize
The number of values (distinct group values) stored in this
GroupValuesSource§fn clear_shrink(&mut self, _batch: &RecordBatch)
fn clear_shrink(&mut self, _batch: &RecordBatch)
Clear the contents and shrink the capacity to the size of the batch (free up memory usage)
Auto Trait Implementations§
impl<O> Freeze for GroupValuesBytes<O>
impl<O> RefUnwindSafe for GroupValuesBytes<O>where
O: RefUnwindSafe,
impl<O> Send for GroupValuesBytes<O>
impl<O> Sync for GroupValuesBytes<O>
impl<O> Unpin for GroupValuesBytes<O>where
O: Unpin,
impl<O> UnwindSafe for GroupValuesBytes<O>where
O: 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
§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