github-actions[bot] commented on code in PR #31595:
URL: https://github.com/apache/doris/pull/31595#discussion_r1507206292


##########
be/src/vec/sink/autoinc_buffer.h:
##########
@@ -101,29 +103,27 @@ class GlobalAutoIncBuffers {
                                   
.set_max_queue_size(std::numeric_limits<int>::max())
                                   .build(&_fetch_autoinc_id_executor));
     }
-    ~GlobalAutoIncBuffers() {
-        for (auto [_, buffer] : _buffers) {
-            delete buffer;
-        }
-    }
+    ~GlobalAutoIncBuffers() = default;
 
     std::unique_ptr<ThreadPoolToken> create_token() {
         return 
_fetch_autoinc_id_executor->new_token(ThreadPool::ExecutionMode::CONCURRENT);
     }
 
-    AutoIncIDBuffer* get_auto_inc_buffer(int64_t db_id, int64_t table_id, 
int64_t column_id) {
+    std::shared_ptr<AutoIncIDBuffer> get_auto_inc_buffer(int64_t db_id, 
int64_t table_id,

Review Comment:
   warning: method 'get_auto_inc_buffer' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
       static std::shared_ptr<AutoIncIDBuffer> get_auto_inc_buffer(int64_t 
db_id, int64_t table_id,
   ```
   



##########
be/src/runtime/query_statistics.cpp:
##########
@@ -123,16 +84,7 @@ void QueryStatistics::merge(QueryStatisticsRecvr* recvr, 
int sender_id) {
     }
 }
 
-void QueryStatistics::clearNodeStatistics() {
-    for (auto& pair : _nodes_statistics_map) {
-        delete pair.second;
-    }
-    _nodes_statistics_map.clear();
-}
-
-QueryStatistics::~QueryStatistics() {
-    clearNodeStatistics();
-}
+QueryStatistics::~QueryStatistics() {}

Review Comment:
   warning: use '= default' to define a trivial destructor 
[modernize-use-equals-default]
   
   ```suggestion
   QueryStatistics::~QueryStatistics() = 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: [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]

Reply via email to