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


##########
be/src/runtime/query_statistics.cpp:
##########
@@ -77,8 +125,16 @@ void QueryStatistics::from_pb(const PQueryStatistics& 
statistics) {
     cpu_nanos = statistics.cpu_ms() * NANOS_PER_MILLIS;
     _scan_bytes_from_local_storage = 
statistics.scan_bytes_from_local_storage();
     _scan_bytes_from_remote_storage = 
statistics.scan_bytes_from_remote_storage();
+    for (int i = 0; i < statistics.node_exec_stats_items_size(); ++i) {
+        const auto& exec_stats_item = statistics.node_exec_stats_items(i);
+        update_exec_stats_item(exec_stats_item.node_id(), 
exec_stats_item.push_rows(), exec_stats_item.pull_rows(),
+                                exec_stats_item.pred_filter_rows(), 
exec_stats_item.index_filter_rows(),
+                                exec_stats_item.rf_filter_rows());
+    }
 }
 
-QueryStatistics::~QueryStatistics() {}
+QueryStatistics::~QueryStatistics() {

Review Comment:
   warning: use '= default' to define a trivial destructor 
[modernize-use-equals-default]
   ```cpp
   QueryStatistics::~QueryStatistics() {
                    ^
   ```
   



##########
be/src/runtime/query_statistics.h:
##########
@@ -88,7 +88,28 @@ class QueryStatistics {
     int64_t get_scan_rows() { return scan_rows; }
     int64_t get_scan_bytes() { return scan_bytes; }
     int64_t get_current_used_memory_bytes() { return 
current_used_memory_bytes; }
-
+    
+    void add_exec_stats_item(uint32_t node_id, int64_t push, int64_t pull, 
int64_t pred_filter, int64_t index_filter,
+                             int64_t rf_filter);
+    void update_exec_stats_item(uint32_t node_id, int64_t push, int64_t pull, 
int64_t pred_filter, int64_t index_filter,
+                                int64_t rf_filter);
+    struct NodeExecStats {
+        std::atomic_int64_t push_rows;
+        std::atomic_int64_t pull_rows;
+        std::atomic_int64_t pred_filter_rows;
+        std::atomic_int64_t index_filter_rows;
+        std::atomic_int64_t rf_filter_rows;
+
+        NodeExecStats() : push_rows(0), pull_rows(0), pred_filter_rows(0), 
index_filter_rows(0), rf_filter_rows(0) {}

Review Comment:
   warning: use '= default' to define a trivial default constructor 
[modernize-use-equals-default]
   
   ```suggestion
           NodeExecStats() : push_rows(0), pull_rows(0), pred_filter_rows(0), 
index_filter_rows(0), rf_filter_rows(0) = 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

Reply via email to