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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 0b681d3d513 [Bug](runtime-filter) fix publish not inited rf when 
broadcast join meet wake up by downsteam #44823 (#44859)
0b681d3d513 is described below

commit 0b681d3d5132c89983170b5ac341faa11de933c7
Author: Pxl <x...@selectdb.com>
AuthorDate: Mon Dec 2 21:32:38 2024 +0800

    [Bug](runtime-filter) fix publish not inited rf when broadcast join meet 
wake up by downsteam #44823 (#44859)
    
    pick from #44823
---
 be/src/pipeline/exec/hashjoin_build_sink.cpp | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/be/src/pipeline/exec/hashjoin_build_sink.cpp 
b/be/src/pipeline/exec/hashjoin_build_sink.cpp
index 500ec6e0365..dff377d62d5 100644
--- a/be/src/pipeline/exec/hashjoin_build_sink.cpp
+++ b/be/src/pipeline/exec/hashjoin_build_sink.cpp
@@ -142,19 +142,23 @@ Status HashJoinBuildSinkLocalState::close(RuntimeState* 
state, Status exec_statu
     }
 
     if (state->get_task()->wake_up_by_downstream()) {
-        RETURN_IF_ERROR(_runtime_filter_slots->send_filter_size(state, 0, 
_finish_dependency));
-        RETURN_IF_ERROR(_runtime_filter_slots->ignore_all_filters());
-    } else {
+        if (_should_build_hash_table) {
+            // partitial ignore rf to make global rf work
+            RETURN_IF_ERROR(_runtime_filter_slots->send_filter_size(state, 0, 
_finish_dependency));
+            RETURN_IF_ERROR(_runtime_filter_slots->ignore_all_filters());
+        } else {
+            // do not publish filter coz local rf not inited and useless
+            return Base::close(state, exec_status);
+        }
+    } else if (_should_build_hash_table) {
         auto* block = _shared_state->build_block.get();
         uint64_t hash_table_size = block ? block->rows() : 0;
         {
             SCOPED_TIMER(_runtime_filter_init_timer);
-            if (_should_build_hash_table) {
-                RETURN_IF_ERROR(_runtime_filter_slots->init_filters(state, 
hash_table_size));
-            }
+            RETURN_IF_ERROR(_runtime_filter_slots->init_filters(state, 
hash_table_size));
             RETURN_IF_ERROR(_runtime_filter_slots->ignore_filters(state));
         }
-        if (_should_build_hash_table && hash_table_size > 1) {
+        if (hash_table_size > 1) {
             SCOPED_TIMER(_runtime_filter_compute_timer);
             _runtime_filter_slots->insert(block);
         }


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

Reply via email to