github-actions[bot] commented on code in PR #25663: URL: https://github.com/apache/doris/pull/25663#discussion_r1366428065
########## be/src/vec/common/hash_table/hash_map.h: ########## @@ -317,17 +314,21 @@ current_build_idx = 0; do_the_probe(); } - while (LIKELY(probe_idx < probe_rows && matched_cnt < batch_size)) { - uint32_t bucket_num = hash_values[probe_idx] & (bucket_size - 1); - build_idx = first[bucket_num]; + while (LIKELY(probe_idx < probe_rows && matched_cnt < _batch_size)) { Review Comment: warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr] ```cpp while (LIKELY(probe_idx < probe_rows && matched_cnt < _batch_size)) { ^ ``` <details> <summary>Additional context</summary> **be/src/common/compiler_util.h:34:** expanded from macro 'LIKELY' ```cpp #define LIKELY(expr) __builtin_expect(!!(expr), 1) ^ ``` </details> ########## be/src/vec/common/hash_table/hash_map.h: ########## @@ -248,18 +253,16 @@ class JoinHashMapTable : public HashMapTable<Key, Cell, Hash, Grower, Allocator> return std::pair {0, 0}; } + size_t get_bucket_mask() { return bucket_size - 1; } + private: template <int JoinOpType> auto _find_batch_left_semi_anti(const Key* __restrict keys, const size_t* __restrict hash_values, int probe_idx, int probe_rows, std::vector<uint32_t>& probe_idxs) { - auto matched_cnt = 0; - const auto batch_size = max_batch_size; - - while (LIKELY(probe_idx < probe_rows && matched_cnt < batch_size)) { - uint32_t bucket_num = hash_values[probe_idx] & (bucket_size - 1); - auto build_idx = first[bucket_num]; - + int matched_cnt = 0; + while (LIKELY(probe_idx < probe_rows && matched_cnt < _batch_size)) { Review Comment: warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr] ```cpp while (LIKELY(probe_idx < probe_rows && matched_cnt < _batch_size)) { ^ ``` <details> <summary>Additional context</summary> **be/src/common/compiler_util.h:34:** expanded from macro 'LIKELY' ```cpp #define LIKELY(expr) __builtin_expect(!!(expr), 1) ^ ``` </details> -- 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