fix another bug in AggregateFunctionMinMaxAny

This commit is contained in:
Alexander Tokmakov 2022-12-09 17:32:28 +01:00
parent f4bc44f729
commit e9fa1accf1
3 changed files with 6 additions and 0 deletions

View File

@ -1163,6 +1163,9 @@ struct AggregateFunctionAnyHeavyData : Data
bool changeIfBetter(const Self & to, Arena * arena)
{
if (!to.has())
return false;
if (this->isEqualTo(to))
{
counter += to.counter;

View File

@ -3,3 +3,4 @@
\N
0 \N \N \N
0 \N \N \N
1

View File

@ -31,3 +31,5 @@ FROM numbers(0)
)
GROUP BY NULL
WITH CUBE;
SELECT anyHeavy('1') FROM (SELECT anyHeavy(1));