HappenLee commented on code in PR #15628:
URL: https://github.com/apache/doris/pull/15628#discussion_r1062140788
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -1109,4 +1114,32 @@ Status FragmentMgr::merge_filter(const
PMergeFilterRequest* request,
return Status::OK();
}
+void FragmentMgr::_setup_shared_hashtable_for_broadcast_join(const
TExecPlanFragmentParams& params,
+ RuntimeState*
state,
+
QueryFragmentsCtx* fragments_ctx) {
+ if
(!params.query_options.__isset.enable_share_hash_table_for_broadcast_join ||
+ !params.query_options.enable_share_hash_table_for_broadcast_join) {
+ return;
+ }
+
+ if (!params.__isset.fragment || !params.fragment.__isset.plan ||
+ params.fragment.plan.nodes.empty()) {
+ return;
+ }
+ for (auto& node : params.fragment.plan.nodes) {
+ if (node.node_type != TPlanNodeType::HASH_JOIN_NODE ||
+ !node.hash_join_node.__isset.is_broadcast_join ||
+ !node.hash_join_node.is_broadcast_join) {
+ continue;
+ }
+
+ std::lock_guard<std::mutex> lock(_lock_for_shared_hash_table);
Review Comment:
why here need a lock here ? rethink the lock is necessary?
--
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]