mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
Merge pull request #49833 from HarryLeeIBM/hlee-s390x-simple-agg
Fix DefaultHash64 for s390x
This commit is contained in:
commit
efc5e69aaf
@ -251,7 +251,10 @@ requires (sizeof(T) <= sizeof(UInt64))
|
||||
inline size_t DefaultHash64(T key)
|
||||
{
|
||||
DB::UInt64 out {0};
|
||||
std::memcpy(&out, &key, sizeof(T));
|
||||
if constexpr (std::endian::native == std::endian::little)
|
||||
std::memcpy(&out, &key, sizeof(T));
|
||||
else
|
||||
std::memcpy(reinterpret_cast<char*>(&out) + sizeof(DB::UInt64) - sizeof(T), &key, sizeof(T));
|
||||
return intHash64(out);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user