Fix partition ID byte order for s390x

This commit is contained in:
HarryLeeIBM 2023-03-20 06:21:16 -07:00 committed by Harry Lee
parent 15893fa94e
commit ed1ff02114

View File

@ -261,8 +261,11 @@ String MergeTreePartition::getID(const Block & partition_key_sample) const
hash.get128(hash_data);
result.resize(32);
for (size_t i = 0; i < 16; ++i)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
writeHexByteLowercase(hash_data[16 - 1 - i], &result[2 * i]);
#else
writeHexByteLowercase(hash_data[i], &result[2 * i]);
#endif
return result;
}