pub fn calc_hash_key_kind(data_types: &[DataType]) -> HashKeyKind
Expand description
Calculate what kind of hash key should be used given the key data types.
When any of following conditions is met, we choose crate::hash::SerializedKey
:
- Has variable size column.
- Number of columns exceeds
MAX_FIXED_SIZE_KEY_ELEMENTS
- Sizes of data types exceed
256
bytes. - Any column’s serialized format can’t be used for equality check.
Otherwise we choose smallest crate::hash::FixedSizeKey
whose size can hold all data types.