You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2025/12/19 01:32:29 UTC
(doris) branch branch-4.0 updated: branch-4.0: [fix](core) fix core if hll_from_base64 input invalid #59106 (#59147)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 3c878bcb4bc branch-4.0: [fix](core) fix core if hll_from_base64 input invalid #59106 (#59147)
3c878bcb4bc is described below
commit 3c878bcb4bc842ab94081a85dd1e13fe801f7622
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Fri Dec 19 09:32:22 2025 +0800
branch-4.0: [fix](core) fix core if hll_from_base64 input invalid #59106 (#59147)
Cherry-picked from #59106
Co-authored-by: Mryange <ya...@selectdb.com>
---
be/src/vec/functions/function_hll.cpp | 3 ++-
.../query_p0/sql_functions/hll_functions/test_hll_functions.groovy | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/functions/function_hll.cpp b/be/src/vec/functions/function_hll.cpp
index a8b827c7475..31ad9584b04 100644
--- a/be/src/vec/functions/function_hll.cpp
+++ b/be/src/vec/functions/function_hll.cpp
@@ -197,7 +197,8 @@ public:
doris::HyperLogLog hll;
if (!hll.deserialize(decoded_slice)) {
return Status::RuntimeError(
- fmt::format("hll_from_base64 decode failed: base64: {}", src_str));
+ fmt::format("hll_from_base64 decode failed: base64: {}",
+ StringRef(src_str, src_size).to_string()));
} else {
res.emplace_back(std::move(hll));
}
diff --git a/regression-test/suites/query_p0/sql_functions/hll_functions/test_hll_functions.groovy b/regression-test/suites/query_p0/sql_functions/hll_functions/test_hll_functions.groovy
index 43afed6f52a..aac99c29bd9 100644
--- a/regression-test/suites/query_p0/sql_functions/hll_functions/test_hll_functions.groovy
+++ b/regression-test/suites/query_p0/sql_functions/hll_functions/test_hll_functions.groovy
@@ -69,4 +69,9 @@ suite("test_hll_functions") {
qt_const_select "select hll_to_base64(hll_empty());"
qt_const_select "select hll_to_base64(hll_hash('abc'));"
qt_const_select "select hll_to_base64(hll_hash(''));"
+
+ test {
+ sql """SELECT hll_from_base64(CAST('AgAAAAAAAABwAAAAAAAAAA==' AS VARCHAR(100))) AS result;"""
+ exception "[RUNTIME_ERROR]hll_from_base64 decode failed";
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org