Better parallel hash JOIN for floats

This commit is contained in:
Alexey Milovidov 2022-09-11 03:03:37 +02:00
parent 6f513dab6f
commit cc38ac3764
2 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,7 @@ void ColumnVector<T>::updateWeakHash32(WeakHash32 & hash) const
while (begin < end)
{
*hash_data = intHashCRC32(*begin, *hash_data);
*hash_data = hashCRC32(*begin, *hash_data);
++begin;
++hash_data;
}

View File

@ -220,7 +220,7 @@ template <typename T> struct HashCRC32;
template <typename T>
requires (sizeof(T) <= sizeof(UInt64))
inline size_t hashCRC32(T key)
inline size_t hashCRC32(T key, DB::UInt64 updated_value = -1)
{
union
{
@ -229,14 +229,14 @@ inline size_t hashCRC32(T key)
} u;
u.out = 0;
u.in = key;
return intHashCRC32(u.out);
return intHashCRC32(u.out, updated_value);
}
template <typename T>
requires (sizeof(T) > sizeof(UInt64))
inline size_t hashCRC32(T key)
inline size_t hashCRC32(T key, DB::UInt64 updated_value = -1)
{
return intHashCRC32(key, -1);
return intHashCRC32(key, updated_value);
}
#define DEFINE_HASH(T) \