From 009dd618a661274f68f4ca0ea0183cdc6f483b95 Mon Sep 17 00:00:00 2001 From: Vladimir Chebotarev Date: Thu, 12 May 2022 01:49:08 +0300 Subject: [PATCH] Draft. --- src/AggregateFunctions/QuantileTDigest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AggregateFunctions/QuantileTDigest.h b/src/AggregateFunctions/QuantileTDigest.h index eda3e52d9db..7121603af42 100644 --- a/src/AggregateFunctions/QuantileTDigest.h +++ b/src/AggregateFunctions/QuantileTDigest.h @@ -103,7 +103,7 @@ class QuantileTDigest */ static Value interpolate(Value x, Value x1, Value y1, Value x2, Value y2) { - if (y1 != y2) + if (y1 != y2) /// Handling infinities of the same sign well. { double k = (x - x1) / (x2 - x1); return y1 + k * (y2 - y1); @@ -162,7 +162,7 @@ class QuantileTDigest { /// The left column "eats" the right. Middle of the batch l_count += r->count; - if (r->mean != l_mean) + if (r->mean != l_mean) /// Handling infinities of the same sign well. { l_mean += r->count * (r->mean - l_mean) / l_count; // Symmetric algo (M1*C1 + M2*C2)/(C1+C2) is numerically better, but slower } @@ -240,7 +240,7 @@ public: // it is possible to merge left and right /// The left column "eats" the right. l_count += r->count; - if (r->mean != l_mean) + if (r->mean != l_mean) /// Handling infinities of the same sign well. { l_mean += r->count * (r->mean - l_mean) / l_count; // Symmetric algo (M1*C1 + M2*C2)/(C1+C2) is numerically better, but slower }