This is an automated email from the ASF dual-hosted git repository.

panxiaolei pushed a commit to branch tpc_preview2
in repository https://gitbox.apache.org/repos/asf/doris.git

commit de7beb224a287a630622cae2b3ae56d050e3d631
Author: BiteTheDDDDt <[email protected]>
AuthorDate: Mon Nov 24 23:50:29 2025 +0800

    reset
---
 be/src/vec/common/hash_table/join_hash_table.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

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 0c3d3951431..9426829e056 100644
--- a/be/src/vec/common/hash_table/join_hash_table.h
+++ b/be/src/vec/common/hash_table/join_hash_table.h
@@ -367,7 +367,7 @@ private:
         const auto batch_size = max_batch_size;
 
         auto do_the_probe = [&]() {
-            while (build_idx) {
+            while (build_idx && matched_cnt < batch_size) {
                 if (_eq(keys[probe_idx], build_keys[build_idx])) {
                     probe_idxs[matched_cnt] = probe_idx;
                     build_idxs[matched_cnt] = build_idx;
@@ -378,10 +378,6 @@ private:
                             visited[build_idx] = 1;
                         }
                     }
-                    if (matched_cnt > batch_size) {
-                        build_idx = next[build_idx];
-                        break;
-                    }
                 }
                 build_idx = next[build_idx];
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to