pub trait HashKey:
EstimateSize
+ Clone
+ Debug
+ Hash
+ Eq
+ Sized
+ Send
+ Sync
+ 'static {
type Bitmap: NullBitmap;
// Required methods
fn build_many(column_indices: &[usize], data_chunk: &DataChunk) -> Vec<Self>;
fn deserialize(&self, data_types: &[DataType]) -> ArrayResult<OwnedRow>;
fn deserialize_to_builders(
&self,
array_builders: &mut [ArrayBuilderImpl],
data_types: &[DataType],
) -> ArrayResult<()>;
fn null_bitmap(&self) -> &Self::Bitmap;
}Expand description
Trait for different kinds of hash keys.
Current comparison implementation treats null == null. This is consistent with postgresql’s
group by implementation, but not join. In pg’s join implementation, null != null, and the join
executor should take care of this.
Required Associated Types§
type Bitmap: NullBitmap
Required Methods§
Sourcefn build_many(column_indices: &[usize], data_chunk: &DataChunk) -> Vec<Self>
fn build_many(column_indices: &[usize], data_chunk: &DataChunk) -> Vec<Self>
Build hash keys from the given data_chunk with column_indices in a batch.
Sourcefn deserialize(&self, data_types: &[DataType]) -> ArrayResult<OwnedRow>
fn deserialize(&self, data_types: &[DataType]) -> ArrayResult<OwnedRow>
Deserializes the hash key into a row.
Sourcefn deserialize_to_builders(
&self,
array_builders: &mut [ArrayBuilderImpl],
data_types: &[DataType],
) -> ArrayResult<()>
fn deserialize_to_builders( &self, array_builders: &mut [ArrayBuilderImpl], data_types: &[DataType], ) -> ArrayResult<()>
Deserializes the hash key into array builders.
Sourcefn null_bitmap(&self) -> &Self::Bitmap
fn null_bitmap(&self) -> &Self::Bitmap
Get the null bitmap of the hash key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".