This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new c6205783fa7 [Bug](function) fix wrong output_char_size on
hll_to_base64 (#36572)
c6205783fa7 is described below
commit c6205783fa705cc80825f894047b5e0d3efec75b
Author: Pxl <[email protected]>
AuthorDate: Mon Jun 24 13:19:28 2024 +0800
[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 ddf0468360c..a6b91e27c2d 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<HyperLogLog&>(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;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]