yiguolei commented on code in PR #46972:
URL: https://github.com/apache/doris/pull/46972#discussion_r1914688503


##########
be/src/pipeline/exec/partitioned_hash_join_sink_operator.cpp:
##########
@@ -87,6 +106,36 @@ Status 
PartitionedHashJoinSinkLocalState::close(RuntimeState* state, Status exec
         return Status::OK();
     }
     dec_running_big_mem_op_num(state);
+
+    if (_runtime_filters.empty() || _shared_state->need_to_spill || 
!_runtime_filter_slots) {
+        return PipelineXSpillSinkLocalState::close(state, exec_status);
+    }
+
+    HashJoinBuildSinkLocalState* inner_sink_state = nullptr;
+    size_t build_rows = 0;
+    vectorized::Block* build_block = nullptr;
+    if (_shared_state->inner_runtime_state) {
+        if (auto* tmp_sink_state = 
_shared_state->inner_runtime_state->get_sink_local_state()) {
+            inner_sink_state = 
assert_cast<HashJoinBuildSinkLocalState*>(tmp_sink_state);
+            build_block = inner_sink_state->_shared_state->build_block.get();
+            build_rows = build_block != nullptr ? build_block->rows() : 0;
+        }
+    }
+
+    {
+        SCOPED_TIMER(_runtime_filter_init_timer);
+        
RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_runtime_filter_slots->init_filters(state, 
build_rows));
+        
RETURN_IF_ERROR(_runtime_filter_slots->disable_meaningless_filters(state));
+    }
+
+    if (build_rows > 1) {
+        SCOPED_TIMER(_runtime_filter_compute_timer);
+        _runtime_filter_slots->insert(build_block);

Review Comment:
   为啥还要传递一个block?有什么意义吗?



-- 
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