From eca62f753cc3c643b47abc08bad38f44fbc83c73 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 24 Nov 2015 06:21:37 +0300 Subject: [PATCH] dbms: fixed error [#METR-19024]. --- .../AggregateFunctions/AggregateFunctionQuantileTDigest.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbms/include/DB/AggregateFunctions/AggregateFunctionQuantileTDigest.h b/dbms/include/DB/AggregateFunctions/AggregateFunctionQuantileTDigest.h index c4e8ad43485..78595aa2f19 100644 --- a/dbms/include/DB/AggregateFunctions/AggregateFunctionQuantileTDigest.h +++ b/dbms/include/DB/AggregateFunctions/AggregateFunctionQuantileTDigest.h @@ -90,7 +90,7 @@ class MergingDigest using Centroid = tdigest::Centroid; /// Сразу будет выделена память на несколько элементов так, чтобы состояние занимало 64 байта. - static constexpr size_t bytes_in_arena = 64 - sizeof(DB::PODArray) - sizeof(TotalCount) * 2; + static constexpr size_t bytes_in_arena = 64 - sizeof(DB::PODArray) - sizeof(TotalCount) - sizeof(uint32_t); using Summary = DB::PODArray, bytes_in_arena>>; @@ -115,7 +115,7 @@ class MergingDigest using CountType = uint32_t; using KeyBits = uint32_t; - static constexpr size_t PART_SIZE_BITS = 11; + static constexpr size_t PART_SIZE_BITS = 8; using Transform = RadixSortFloatTransform; using Allocator = RadixSortMallocAllocator; @@ -296,9 +296,9 @@ public: b_index = sum + (summary[i].count - 1) * 0.5; } - auto res_of_results = interpolate(index, a_index, a_mean, b_index, b_mean); + auto rest_of_results = interpolate(index, a_index, a_mean, b_index, b_mean); for (; result_num < size; ++result_num) - result[levels_permutation[result_num]] = res_of_results; + result[levels_permutation[result_num]] = rest_of_results; } /** Объединить с другим состоянием.