pub struct ByteViewGroupValueBuilder<B>where
B: ByteViewType,{
views: Vec<u128>,
in_progress: Vec<u8>,
completed: Vec<Buffer>,
max_block_size: usize,
nulls: MaybeNullBufferBuilder,
_phantom: PhantomData<B>,
}Expand description
An implementation of GroupColumn for binary view and utf8 view types.
Stores a collection of binary view or utf8 view group values in a buffer
whose structure is similar to GenericByteViewArray, and we can get benefits:
- Efficient comparison of incoming rows to existing rows
- Efficient construction of the final output array
- Efficient to perform
take_ncomparing to useGenericByteViewBuilder
Fields§
§views: Vec<u128>§in_progress: Vec<u8>§completed: Vec<Buffer>§max_block_size: usize§nulls: MaybeNullBufferBuilder§_phantom: PhantomData<B>Implementations§
Source§impl<B> ByteViewGroupValueBuilder<B>where
B: ByteViewType,
impl<B> ByteViewGroupValueBuilder<B>where
B: ByteViewType,
pub fn new() -> ByteViewGroupValueBuilder<B>
Trait Implementations§
Source§impl<B> Default for ByteViewGroupValueBuilder<B>where
B: ByteViewType,
impl<B> Default for ByteViewGroupValueBuilder<B>where
B: ByteViewType,
Source§fn default() -> ByteViewGroupValueBuilder<B>
fn default() -> ByteViewGroupValueBuilder<B>
Returns the “default value” for a type. Read more
Source§impl<B> GroupColumn for ByteViewGroupValueBuilder<B>where
B: ByteViewType,
impl<B> GroupColumn for ByteViewGroupValueBuilder<B>where
B: ByteViewType,
Source§fn equal_to(
&self,
lhs_row: usize,
array: &Arc<dyn Array>,
rhs_row: usize,
) -> bool
fn equal_to( &self, lhs_row: usize, array: &Arc<dyn Array>, rhs_row: usize, ) -> bool
Returns equal if the row stored in this builder at
lhs_row is equal to
the row in array at rhs_row Read moreSource§fn append_val(
&mut self,
array: &Arc<dyn Array>,
row: usize,
) -> Result<(), DataFusionError>
fn append_val( &mut self, array: &Arc<dyn Array>, row: usize, ) -> Result<(), DataFusionError>
Appends the row at
row in array to this builderSource§fn vectorized_equal_to(
&self,
group_indices: &[usize],
array: &Arc<dyn Array>,
rows: &[usize],
equal_to_results: &mut [bool],
)
fn vectorized_equal_to( &self, group_indices: &[usize], array: &Arc<dyn Array>, rows: &[usize], equal_to_results: &mut [bool], )
The vectorized version equal to Read more
Source§fn vectorized_append(
&mut self,
array: &Arc<dyn Array>,
rows: &[usize],
) -> Result<(), DataFusionError>
fn vectorized_append( &mut self, array: &Arc<dyn Array>, rows: &[usize], ) -> Result<(), DataFusionError>
The vectorized version
append_valSource§fn size(&self) -> usize
fn size(&self) -> usize
Returns the number of bytes used by this
GroupColumnSource§fn build(self: Box<ByteViewGroupValueBuilder<B>>) -> Arc<dyn Array>
fn build(self: Box<ByteViewGroupValueBuilder<B>>) -> Arc<dyn Array>
Builds a new array from all of the stored rows
Auto Trait Implementations§
impl<B> Freeze for ByteViewGroupValueBuilder<B>
impl<B> RefUnwindSafe for ByteViewGroupValueBuilder<B>where
B: RefUnwindSafe,
impl<B> Send for ByteViewGroupValueBuilder<B>
impl<B> Sync for ByteViewGroupValueBuilder<B>
impl<B> Unpin for ByteViewGroupValueBuilder<B>where
B: Unpin,
impl<B> UnwindSafe for ByteViewGroupValueBuilder<B>where
B: 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