Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion be/src/vec/functions/function_hll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ class FunctionHllFromBase64 : public IFunction {
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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
Loading