This is an automated email from the ASF dual-hosted git repository. jacktengg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new c9884e6d943 [fix](hash join) fix numeric overflow when calculating hash table bucket size (#37193) c9884e6d943 is described below commit c9884e6d9431c3499bcc58cd2c1599ceabb0e753 Author: TengJianPing <18241664+jackte...@users.noreply.github.com> AuthorDate: Wed Jul 3 17:04:16 2024 +0800 [fix](hash join) fix numeric overflow when calculating hash table bucket size (#37193) --- be/src/vec/common/hash_table/join_hash_table.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/be/src/vec/common/hash_table/join_hash_table.h b/be/src/vec/common/hash_table/join_hash_table.h index a869ad419ad..99ce2d13b48 100644 --- a/be/src/vec/common/hash_table/join_hash_table.h +++ b/be/src/vec/common/hash_table/join_hash_table.h @@ -19,6 +19,8 @@ #include <gen_cpp/PlanNodes_types.h> +#include <limits> + #include "vec/columns/column_filter_helper.h" #include "vec/common/hash_table/hash.h" #include "vec/common/hash_table/hash_table.h" @@ -35,7 +37,8 @@ public: static uint32_t calc_bucket_size(size_t num_elem) { size_t expect_bucket_size = num_elem + (num_elem - 1) / 7; - return phmap::priv::NormalizeCapacity(expect_bucket_size) + 1; + return std::min(phmap::priv::NormalizeCapacity(expect_bucket_size) + 1, + static_cast<size_t>(std::numeric_limits<uint32_t>::max())); } size_t get_byte_size() const { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org