1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-1983 Have regr_intercept, regr_slope and regr_r2 return NULL for 1 or 0 rows in set

This commit is contained in:
David Hall
2018-11-29 13:31:12 -06:00
parent 453850ee1a
commit 0cef3bf31c
4 changed files with 4 additions and 4 deletions

View File

@@ -144,7 +144,7 @@ mcsv1_UDAF::ReturnCode regr_r2::evaluate(mcsv1Context* context, static_any::any&
{
struct regr_r2_data* data = (struct regr_r2_data*)context->getUserData()->data;
double N = data->cnt;
if (N > 0)
if (N > 1)
{
double sumx = data->sumx;
double sumy = data->sumy;