mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix non-deterministic result of "uniq" aggregate function in extreme rare cases
This commit is contained in:
parent
71eed6507e
commit
268854d14e
@ -146,6 +146,19 @@ private:
|
|||||||
reinsertImpl(x);
|
reinsertImpl(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** We must process first collision resolution chain once again.
|
||||||
|
* Look at the comment in "resize" function.
|
||||||
|
*/
|
||||||
|
for (size_t i = 0; i < buf_size() && buf[i]; ++i)
|
||||||
|
{
|
||||||
|
if (unlikely(i != place(buf[i])))
|
||||||
|
{
|
||||||
|
HashValue x = buf[i];
|
||||||
|
buf[i] = 0;
|
||||||
|
reinsertImpl(x);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Increase the size of the buffer 2 times or up to new_size_degree, if it is non-zero.
|
/// Increase the size of the buffer 2 times or up to new_size_degree, if it is non-zero.
|
||||||
|
Loading…
Reference in New Issue
Block a user