mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix DefaultHash64 for s390x
This commit is contained in:
parent
a2eaa79b37
commit
809fdc7b16
@ -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