zhiqiang-hhhh commented on code in PR #39187:
URL: https://github.com/apache/doris/pull/39187#discussion_r1797617518


##########
be/src/vec/aggregate_functions/aggregate_function_regr_union.h:
##########
@@ -97,6 +103,42 @@ struct AggregateFunctionRegrData {
         Float64 slope = (count * sum_of_x_mul_y - sum_x * sum_y) / denominator;
         return slope;
     }
+
+    Float64 get_regr_sxx_result() const {
+        Float64 result = sum_of_x_squared - (sum_x * sum_x) / count;

Review Comment:
   what if count is zero



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