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


##########
be/src/vec/aggregate_functions/aggregate_function_stddev.h:
##########
@@ -108,21 +109,21 @@ struct BaseData {
             return;
         }
         double delta = mean - rhs.mean;
-        double sum_count = count + rhs.count;
-        mean = rhs.mean + delta * count / sum_count;
-        m2 = rhs.m2 + m2 + (delta * delta) * rhs.count * count / sum_count;
+        double sum_count = double(count + rhs.count);
+        mean = rhs.mean + delta * (double)count / sum_count;
+        m2 = rhs.m2 + m2 + (delta * delta) * (double)rhs.count * (double)count 
/ sum_count;
         count = int64_t(sum_count);
     }
 
     void add(const IColumn* column, size_t row_num) {
         const auto& sources =
                 assert_cast<const ColumnVector<T>&, 
TypeCheckOnRelease::DISABLE>(*column);
-        double source_data = sources.get_data()[row_num];
+        double source_data = (double)sources.get_data()[row_num];

Review Comment:
   warning: use auto when initializing with a cast to avoid duplicating the 
type name [modernize-use-auto]
   
   ```suggestion
           auto source_data = (double)sources.get_data()[row_num];
   ```
   



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