mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #42020 from canhld94/ch_canh_fix_rankcorr
Fix rankCorr size overflow
This commit is contained in:
commit
85e4311127
@ -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 Float64 size = static_cast<Float64>(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