pub enum HashKeys {
RowEncoded(RowEncodedKeys),
Single(SingleKeys),
}
Expand description
Represents a DataFrame plus a hash per row, intended for keys in grouping or joining. The hashes may or may not actually be physically pre-computed, this depends per type.
Variants§
RowEncoded(RowEncodedKeys)
Single(SingleKeys)
Implementations§
Source§impl HashKeys
impl HashKeys
pub fn from_df( df: &DataFrame, random_state: PlRandomState, null_is_valid: bool, force_row_encoding: bool, ) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn gen_partition_idxs(
&self,
partitioner: &HashPartitioner,
partition_idxs: &mut [Vec<IdxSize>],
sketches: &mut [CardinalitySketch],
partition_nulls: bool,
)
pub fn gen_partition_idxs( &self, partitioner: &HashPartitioner, partition_idxs: &mut [Vec<IdxSize>], sketches: &mut [CardinalitySketch], partition_nulls: bool, )
After this call partition_idxs[p] will contain the indices of hashes that belong to partition p, and the cardinality sketches are updated accordingly.
Sourcepub fn gen_partitioned_gather_idxs(
&self,
partitioner: &HashPartitioner,
gathers_per_key: &[IdxSize],
gather_idxs: &mut Vec<ChunkId<32>>,
)
pub fn gen_partitioned_gather_idxs( &self, partitioner: &HashPartitioner, gathers_per_key: &[IdxSize], gather_idxs: &mut Vec<ChunkId<32>>, )
Generates indices for a chunked gather such that the ith key gathers the next gathers_per_key[i] elements from the partition[i]th chunk.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HashKeys
impl !RefUnwindSafe for HashKeys
impl Send for HashKeys
impl Sync for HashKeys
impl Unpin for HashKeys
impl !UnwindSafe for HashKeys
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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