From 53f22bbc142bc9d0dc408f357ef687e759fd4d0b Mon Sep 17 00:00:00 2001 From: spaces-x Date: Thu, 17 Feb 2022 10:47:22 +0800 Subject: [PATCH] [fix] fix incorrect serialized_size of TDigest object (#8046) --- be/src/util/tdigest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/util/tdigest.h b/be/src/util/tdigest.h index 09a188eb78..66ff7ccda8 100644 --- a/be/src/util/tdigest.h +++ b/be/src/util/tdigest.h @@ -443,7 +443,7 @@ public: } uint32_t serialized_size() { - return sizeof(Value) * 5 + sizeof(Index) * 2 + sizeof(size_t) * 3 + + return sizeof(Value) * 5 + sizeof(Index) * 2 + sizeof(uint32_t) * 3 + _processed.size() * sizeof(Centroid) + _unprocessed.size() * sizeof(Centroid) + _cumulative.size() * sizeof(Weight); }