pub struct GroupValuesColumn<const STREAMING: bool> {
schema: Arc<Schema>,
map: HashTable<(u64, GroupIndexView)>,
map_size: usize,
group_index_lists: Vec<Vec<usize>>,
emit_group_index_list_buffer: Vec<usize>,
vectorized_operation_buffers: VectorizedOperationBuffers,
group_values: Vec<Box<dyn GroupColumn>>,
hashes_buffer: Vec<u64>,
random_state: RandomState,
}Expand description
A GroupValues that stores multiple columns of group values,
and supports vectorized operators for them
Fields§
§schema: Arc<Schema>§map: HashTable<(u64, GroupIndexView)>§map_size: usize§group_index_lists: Vec<Vec<usize>>§emit_group_index_list_buffer: Vec<usize>§vectorized_operation_buffers: VectorizedOperationBuffers§group_values: Vec<Box<dyn GroupColumn>>§hashes_buffer: Vec<u64>§random_state: RandomStateImplementations§
Source§impl<const STREAMING: bool> GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> GroupValuesColumn<STREAMING>
Sourcepub fn try_new(
schema: Arc<Schema>,
) -> Result<GroupValuesColumn<STREAMING>, DataFusionError>
pub fn try_new( schema: Arc<Schema>, ) -> Result<GroupValuesColumn<STREAMING>, DataFusionError>
Create a new instance of GroupValuesColumn if supported for the specified schema
Trait Implementations§
Source§impl<const STREAMING: bool> GroupValues for GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> GroupValues for GroupValuesColumn<STREAMING>
Source§fn intern(
&mut self,
cols: &[Arc<dyn Array>],
groups: &mut Vec<usize>,
) -> Result<(), DataFusionError>
fn intern( &mut self, cols: &[Arc<dyn Array>], groups: &mut Vec<usize>, ) -> Result<(), DataFusionError>
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 emit(
&mut self,
emit_to: EmitTo,
) -> Result<Vec<Arc<dyn Array>>, DataFusionError>
fn emit( &mut self, emit_to: EmitTo, ) -> Result<Vec<Arc<dyn Array>>, DataFusionError>
Emits the group values
Source§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<const STREAMING: bool> Freeze for GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> !RefUnwindSafe for GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> Send for GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> Sync for GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> Unpin for GroupValuesColumn<STREAMING>
impl<const STREAMING: bool> !UnwindSafe for GroupValuesColumn<STREAMING>
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