fix unique for empty point sets

This commit is contained in:
Mikhail Surin 2018-07-07 13:37:07 +03:00
parent 8c4f04c452
commit ca837723ed
3 changed files with 5 additions and 0 deletions

View File

@ -159,6 +159,9 @@ private:
*/ */
void unique() void unique()
{ {
if (size == 0)
return;
size_t left = 0; size_t left = 0;
for (auto right = left + 1; right < size; right++) for (auto right = left + 1; right < size; right++)

View File

@ -5,3 +5,4 @@
0.36 0.99 4.75 0.36 0.99 4.75
-1 1 80 -1 1 80
[(-2,-2,1)] [(-2,-2,1)]
[]

View File

@ -6,3 +6,4 @@ WITH arrayJoin(histogram(1)(sin(number-40))) AS res SELECT round(res.1, 2), roun
SELECT histogram(10)(-2); SELECT histogram(10)(-2);
select histogramIf(3)(number, number > 11) from (select * from system.numbers limit 10);