mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Better parallel hash JOIN for floats
This commit is contained in:
parent
6f513dab6f
commit
cc38ac3764
@ -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;
|
||||
}
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user