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


##########
be/src/runtime/query_statistics.h:
##########
@@ -124,15 +122,19 @@ class QueryStatistics {
 
 private:
     friend class QueryStatisticsRecvr;
-    int64_t scan_rows;
-    int64_t scan_bytes;
-    int64_t cpu_ms;
+    int64_t scan_rows = 0;
+    int64_t scan_bytes = 0;
+    int64_t cpu_ms = 0;

Review Comment:
   warning: use default member initializer for 'scan_rows' 
[modernize-use-default-member-init]
   
   be/src/runtime/query_statistics.h:62:
   ```diff
   -             : scan_rows(0),
   +             : ,
   ```
   
   ```suggestion
       int64_t scan_rows{0};
   ```
   



##########
be/src/runtime/buffer_control_block.h:
##########
@@ -104,6 +104,12 @@ class BufferControlBlock {
         }
     }
 
+    void update_total_return_rows(int64_t rows) {

Review Comment:
   warning: method 'update_max_peak_memory_bytes' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
       static void update_max_peak_memory_bytes() {
   ```
   



##########
be/src/runtime/query_statistics.h:
##########
@@ -124,15 +122,19 @@
 
 private:
     friend class QueryStatisticsRecvr;
-    int64_t scan_rows;
-    int64_t scan_bytes;
-    int64_t cpu_ms;
+    int64_t scan_rows = 0;
+    int64_t scan_bytes = 0;
+    int64_t cpu_ms = 0;
+    // eg: select sum(k1) from table group by k2 limit 3;
+    // total_return_rows = count(select sum(k1) from table group by k2);

Review Comment:
   warning: use default member initializer for 'cpu_ms' 
[modernize-use-default-member-init]
   
   be/src/runtime/query_statistics.h:64:
   ```diff
   -               cpu_ms(0),
   +               ,
   ```
   
   ```suggestion
       int64_t cpu_ms{0};
   ```
   



##########
be/src/runtime/query_statistics.h:
##########
@@ -124,15 +122,19 @@
 
 private:
     friend class QueryStatisticsRecvr;
-    int64_t scan_rows;
-    int64_t scan_bytes;
-    int64_t cpu_ms;
+    int64_t scan_rows = 0;
+    int64_t scan_bytes = 0;
+    int64_t cpu_ms = 0;
+    // eg: select sum(k1) from table group by k2 limit 3;

Review Comment:
   warning: use default member initializer for 'scan_bytes' 
[modernize-use-default-member-init]
   
   be/src/runtime/query_statistics.h:63:
   ```diff
   -               scan_bytes(0),
   +               ,
   ```
   
   ```suggestion
       int64_t scan_bytes{0};
   ```
   



-- 
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