mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
Fix build.
This commit is contained in:
parent
9f82f43fdd
commit
6d1640643a
@ -3,6 +3,7 @@
|
||||
#include <Common/SipHash.h>
|
||||
#include <Common/assert_cast.h>
|
||||
#include <Common/WeakHash.h>
|
||||
#include <Common/HashTable/Hash.h>
|
||||
|
||||
#include <common/unaligned.h>
|
||||
|
||||
|
@ -68,7 +68,20 @@ void ColumnVector<T>::updateWeakHash32(WeakHash32 & hash) const
|
||||
|
||||
while (begin < end)
|
||||
{
|
||||
*hash_data = intHashCRC32(*begin, *hash_data);
|
||||
if constexpr (sizeof(T) <= sizeof(UInt64))
|
||||
{
|
||||
*hash_data = intHashCRC32(*begin, *hash_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto * begin64 = reinterpret_cast<const UInt64 *>(begin);
|
||||
for (size_t i = 0; i < sizeof(T); i += sizeof(UInt64))
|
||||
{
|
||||
*hash_data = intHashCRC32(*begin64, *hash_data);
|
||||
++begin64;
|
||||
}
|
||||
}
|
||||
|
||||
++begin;
|
||||
++hash_data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user