From 1d0caf1c906f359b90ed7c6a266417a463cfbe34 Mon Sep 17 00:00:00 2001 From: alesapin Date: Sat, 30 Nov 2024 18:49:15 +0100 Subject: [PATCH] Trivial change --- src/Columns/ColumnAggregateFunction.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Columns/ColumnAggregateFunction.cpp b/src/Columns/ColumnAggregateFunction.cpp index 2569d2235a3..902096c788e 100644 --- a/src/Columns/ColumnAggregateFunction.cpp +++ b/src/Columns/ColumnAggregateFunction.cpp @@ -418,9 +418,10 @@ WeakHash32 ColumnAggregateFunction::getWeakHash32() const void ColumnAggregateFunction::updateHashFast(SipHash & hash) const { - /// Fallback to per-element hashing, as there is no faster way - for (size_t i = 0; i < size(); ++i) - updateHashWithValue(i, hash); + WriteBufferFromOwnString wbuf; + const ColumnAggregateFunction::Container & vec = getData(); + func->serializeBatch(vec, 0, size(), wbuf); + hash.update(wbuf.str().c_str(), wbuf.str().size()); } /// The returned size is less than real size. The reason is that some parts of