fix hashing in DataPartWriterCompact

This commit is contained in:
Anton Popov 2020-07-09 21:26:54 +03:00
parent 9f72baad1f
commit 80a62977f1

View File

@ -217,8 +217,9 @@ void MergeTreeDataPartWriterCompact::addToChecksums(MergeTreeDataPartChecksums &
for (const auto & [_, stream] : compressed_streams)
{
uncompressed_size += stream->hashing_buf.count();
auto stream_hash = stream->hashing_buf.getHash();
uncompressed_hash = CityHash_v1_0_2::CityHash128WithSeed(
reinterpret_cast<char *>(&uncompressed_hash), sizeof(uncompressed_hash), uncompressed_hash);
reinterpret_cast<char *>(&stream_hash), sizeof(stream_hash), uncompressed_hash);
}
checksums.files[data_file_name].uncompressed_size = uncompressed_size;