mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
fix rankcorr size overflow
This commit is contained in:
parent
298ad5d6d3
commit
34f598e09b
@ -32,7 +32,7 @@ struct RankCorrelationData : public StatisticalSample<Float64, Float64>
|
||||
std::tie(ranks_y, std::ignore) = computeRanksAndTieCorrection(this->y);
|
||||
|
||||
/// Sizes can be non-equal due to skipped NaNs.
|
||||
const auto size = std::min(this->size_x, this->size_y);
|
||||
const Float32 size = static_cast<Float32>(std::min(this->size_x, this->size_y));
|
||||
|
||||
/// Count d^2 sum
|
||||
Float64 answer = 0;
|
||||
|
@ -0,0 +1 @@
|
||||
-1
|
@ -0,0 +1 @@
|
||||
SELECT round(rankCorr(number, -number)) FROM numbers(5000000);
|
Loading…
Reference in New Issue
Block a user