HappenLee commented on code in PR #32180:
URL: https://github.com/apache/doris/pull/32180#discussion_r1546038399
##########
be/src/pipeline/exec/hashjoin_build_sink.cpp:
##########
@@ -112,6 +121,40 @@ Status HashJoinBuildSinkLocalState::open(RuntimeState*
state) {
return Status::OK();
}
+Status HashJoinBuildSinkLocalState::close(RuntimeState* state, Status
exec_status) {
+ auto p = _parent->cast<HashJoinBuildSinkOperatorX>();
+ Defer defer {[&]() {
+ if (_should_build_hash_table && p._shared_hashtable_controller) {
+ p._shared_hashtable_controller->signal_finish(p.node_id());
+ }
+ }};
+
+ if (!_runtime_filter_slots || _runtime_filters.empty()) {
+ return Status::OK();
+ }
+ auto* block = _shared_state->build_block.get();
+ uint64_t hash_table_size = block ? block->rows() : 0;
+ {
+ SCOPED_TIMER(_runtime_filter_init_timer);
+ RETURN_IF_ERROR(_runtime_filter_slots->init_filters(state,
hash_table_size));
+ RETURN_IF_ERROR(_runtime_filter_slots->ignore_filters(state,
hash_table_size));
+ }
+ if (_should_build_hash_table) {
+ if (hash_table_size > 1) {
+ SCOPED_TIMER(_runtime_filter_compute_timer);
+ _runtime_filter_slots->insert(block);
+ }
+ {
+ SCOPED_TIMER(_publish_runtime_filter_timer);
+ RETURN_IF_ERROR(_runtime_filter_slots->publish());
+ }
+ } else {
+ SCOPED_TIMER(_publish_runtime_filter_timer);
+ RETURN_IF_ERROR(_runtime_filter_slots->publish(true));
Review Comment:
! _should_build_hash_table
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]