github-actions[bot] commented on code in PR #26513:
URL: https://github.com/apache/doris/pull/26513#discussion_r1384524260


##########
be/src/vec/common/hash_table/hash_map.h:
##########
@@ -213,7 +214,7 @@ class JoinHashMapTable : public HashMapTable<Key, Cell, 
Hash, Grower, Allocator>
     using HashMapTable<Key, Cell, Hash, Grower, Allocator>::HashMapTable;
 
     static uint32_t calc_bucket_size(size_t num_elem) {
-        size_t expect_bucket_size = static_cast<size_t>(num_elem) + (num_elem 
- 1) / 7;
+        size_t expect_bucket_size = num_elem + (num_elem - 1) / 7;

Review Comment:
   warning: 7 is a magic number; consider replacing it with a named constant 
[readability-magic-numbers]
   ```cpp
           size_t expect_bucket_size = num_elem + (num_elem - 1) / 7;
                                                                   ^
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to