mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 03:22:14 +00:00
Addition to prev. revision [#METR-23237].
This commit is contained in:
parent
be84b78b93
commit
6c9dea8a8b
@ -65,18 +65,18 @@ void ActiveMetrics::run()
|
||||
}
|
||||
|
||||
|
||||
template <typename Max>
|
||||
static void calculateMax(Max & max, Max x)
|
||||
template <typename Max, typename T>
|
||||
static void calculateMax(Max & max, T x)
|
||||
{
|
||||
if (x > max)
|
||||
if (Max(x) > max)
|
||||
max = x;
|
||||
}
|
||||
|
||||
template <typename Max, typename Sum>
|
||||
static void calculateMaxAndSum(Max & max, Sum & sum, Max x)
|
||||
template <typename Max, typename Sum, typename T>
|
||||
static void calculateMaxAndSum(Max & max, Sum & sum, T x)
|
||||
{
|
||||
sum += x;
|
||||
if (x > max)
|
||||
if (Max(x) > max)
|
||||
max = x;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user