You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "BiteTheDDDDt (via GitHub)" <gi...@apache.org> on 2023/10/20 03:49:25 UTC
[PR] [Improvement](join) update dev_join [doris]
BiteTheDDDDt opened a new pull request, #25663:
URL: https://github.com/apache/doris/pull/25663
## Proposed changes
update dev_join
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Improvement](join) update dev_join [doris]
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt merged PR #25663:
URL: https://github.com/apache/doris/pull/25663
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Improvement](join) update dev_join [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org