From a35c5a914f4a7f1951ca24a8cd3464f8cfac7099 Mon Sep 17 00:00:00 2001 From: HarryLeeIBM Date: Thu, 24 Nov 2022 13:44:38 -0800 Subject: [PATCH] Revert "Fix bloom filter serialization endian issue for s390x" This reverts commit 8f7970d598a699cdf31634ec17bbdddee9628d55. --- .../MergeTree/MergeTreeIndexGranuleBloomFilter.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeIndexGranuleBloomFilter.cpp b/src/Storages/MergeTree/MergeTreeIndexGranuleBloomFilter.cpp index 8654b166f89..deed9b3f071 100644 --- a/src/Storages/MergeTree/MergeTreeIndexGranuleBloomFilter.cpp +++ b/src/Storages/MergeTree/MergeTreeIndexGranuleBloomFilter.cpp @@ -96,10 +96,6 @@ void MergeTreeIndexGranuleBloomFilter::deserializeBinary(ReadBuffer & istr, Merg static size_t atom_size = 8; size_t bytes_size = (bits_per_row * total_rows + atom_size - 1) / atom_size; filter = std::make_shared(bytes_size, hash_functions, 0); - -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - bytes_size = std::max(atom_size, bytes_size); -#endif istr.readStrict(reinterpret_cast(filter->getFilter().data()), bytes_size); } } @@ -111,11 +107,7 @@ void MergeTreeIndexGranuleBloomFilter::serializeBinary(WriteBuffer & ostr) const static size_t atom_size = 8; writeVarUInt(total_rows, ostr); -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - size_t bytes_size = std::max(atom_size, (bits_per_row * total_rows + atom_size - 1) / atom_size); -#else size_t bytes_size = (bits_per_row * total_rows + atom_size - 1) / atom_size; -#endif for (const auto & bloom_filter : bloom_filters) ostr.write(reinterpret_cast(bloom_filter->getFilter().data()), bytes_size); }