github-actions[bot] commented on code in PR #34145: URL: https://github.com/apache/doris/pull/34145#discussion_r1582833180
########## be/src/pipeline/dependency.h: ########## @@ -418,6 +469,8 @@ struct PartitionedAggSharedState : public BasicSharedState, void close(); + void close_spill() { in_mem_shared_state->close_mem_data(); } Review Comment: warning: method 'close_spill' can be made const [readability-make-member-function-const] ```suggestion void close_spill() const { in_mem_shared_state->close_mem_data(); } ``` ########## be/src/pipeline/dependency.h: ########## @@ -578,14 +648,38 @@ bool probe_ignore_null = false; }; +struct HashJoinMemData { + std::vector<std::unique_ptr<vectorized::MutableBlock>> partitioned_build_blocks; + ~HashJoinMemData() { + std::unique_ptr<doris::AttachTask> attach_task; + auto mem_tracker_lable = doris::thread_context()->thread_mem_tracker()->label(); + if (mem_tracker_lable == "Orphan") { + attach_task = std::make_unique<doris::AttachTask>(mem_tracker, query_id); + } + std::vector<std::unique_ptr<vectorized::MutableBlock>> {}.swap(partitioned_build_blocks); + } + void setup_mem_tracker(TUniqueId query_id_, + std::shared_ptr<MemTrackerLimiter> query_mem_tracker_) { + query_id = query_id_; + mem_tracker = std::move(query_mem_tracker_); + } + TUniqueId query_id; + std::shared_ptr<MemTrackerLimiter> mem_tracker; +}; struct PartitionedHashJoinSharedState : public HashJoinSharedState, public std::enable_shared_from_this<PartitionedHashJoinSharedState> { ENABLE_FACTORY_CREATOR(PartitionedHashJoinSharedState) + PartitionedHashJoinSharedState() Review Comment: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] be/src/pipeline/dependency.h:675: ```diff - partitioned_build_blocks(mem_data->partitioned_build_blocks) {} + partitioned_build_blocks(mem_data->partitioned_build_blocks) = default; ``` -- 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