From c8d21e36747661b041fdd85d490c70667bf7878c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 12 Mar 2016 08:25:55 +0300 Subject: [PATCH] Fixed informational size in bytes of ColumnAggregateFunction [#METR-20359]. --- dbms/include/DB/Columns/ColumnAggregateFunction.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dbms/include/DB/Columns/ColumnAggregateFunction.h b/dbms/include/DB/Columns/ColumnAggregateFunction.h index 2e1f2268c20..bbb372ed0c4 100644 --- a/dbms/include/DB/Columns/ColumnAggregateFunction.h +++ b/dbms/include/DB/Columns/ColumnAggregateFunction.h @@ -215,7 +215,12 @@ public: size_t byteSize() const override { - return getData().size() * sizeof(getData()[0]); + size_t res = getData().size() * sizeof(getData()[0]); + + for (const auto & arena : arenas) + res += arena.get()->size(); + + return res; } void insertRangeFrom(const IColumn & src, size_t start, size_t length) override