mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #59132 from HarryLeeIBM/hlee-arm64-hash
Fix aggregation issue in mixed x86_64 and ARM clusters
This commit is contained in:
commit
80066118d9
@ -71,6 +71,28 @@ struct StringHashTableHash
|
||||
res = _mm_crc32_u64(res, key.c);
|
||||
return res;
|
||||
}
|
||||
#elif defined(__aarch64__) && defined(__ARM_FEATURE_CRC32)
|
||||
size_t ALWAYS_INLINE operator()(StringKey8 key) const
|
||||
{
|
||||
size_t res = -1ULL;
|
||||
res = __crc32cd(static_cast<UInt32>(res), key);
|
||||
return res;
|
||||
}
|
||||
size_t ALWAYS_INLINE operator()(StringKey16 key) const
|
||||
{
|
||||
size_t res = -1ULL;
|
||||
res = __crc32cd(static_cast<UInt32>(res), key.items[0]);
|
||||
res = __crc32cd(static_cast<UInt32>(res), key.items[1]);
|
||||
return res;
|
||||
}
|
||||
size_t ALWAYS_INLINE operator()(StringKey24 key) const
|
||||
{
|
||||
size_t res = -1ULL;
|
||||
res = __crc32cd(static_cast<UInt32>(res), key.a);
|
||||
res = __crc32cd(static_cast<UInt32>(res), key.b);
|
||||
res = __crc32cd(static_cast<UInt32>(res), key.c);
|
||||
return res;
|
||||
}
|
||||
#elif defined(__s390x__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
size_t ALWAYS_INLINE operator()(StringKey8 key) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user