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.
Object Safety§
This trait is not object safe.