From c6205783fa705cc80825f894047b5e0d3efec75b Mon Sep 17 00:00:00 2001 From: Pxl Date: Mon, 24 Jun 2024 13:19:28 +0800 Subject: [PATCH] [Bug](function) fix wrong output_char_size on hll_to_base64 (#36572) ## Proposed changes pick from #36529 --- be/src/vec/functions/function_hll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/vec/functions/function_hll.cpp b/be/src/vec/functions/function_hll.cpp index ddf0468360..a6b91e27c2 100644 --- a/be/src/vec/functions/function_hll.cpp +++ b/be/src/vec/functions/function_hll.cpp @@ -278,11 +278,11 @@ struct HllToBase64 { for (size_t i = 0; i < size; ++i) { auto& hll_val = const_cast(data[i]); auto ser_size = hll_val.max_serialized_size(); - output_char_size += ser_size * (int)(4.0 * ceil((double)ser_size / 3.0)); + output_char_size += (int)(4.0 * ceil((double)ser_size / 3.0)); } ColumnString::check_chars_length(output_char_size, size); chars.resize(output_char_size); - auto chars_data = chars.data(); + auto* chars_data = chars.data(); size_t cur_ser_size = 0; size_t last_ser_size = 0;