**Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/22534/0733144b4a355394fecb837ba01af76a50e3fa05/fuzzer_debug/server.log

**How to reproduce**
`SELECT emptyArrayToSingle(arrayFilter(x -> (x != inf), arrayJoin([[1024], []]))) FROM system.one ANY LEFT JOIN (SELECT dummy, [257], NULL, dummy AS value) AS js2 USING (dummy) GROUP BY emptyArrayToSingle(arrayFilter(x -> (x != 1.), arrayJoin([[]])))`

{
    }
    void updateHashFast(SipHash & ) const override
    {
    }
    void insertFrom(const IColumn &, size_t) override
    {
        ++s;
    }
    void insertRangeFrom(const IColumn & , size_t , size_t length) override
    {
        s += length;
    }
    ColumnPtr filter(const Filter & filt, ssize_t ) const override
    {
        return cloneDummy(countBytesInFilter(filt));
    }
    ColumnPtr permute(const Permutation & perm, size_t limit) const override
    {
        if (s != perm.size())
            throw Exception("Size of permutation doesn't match size of column.", ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
        return cloneDummy(limit ? std::min(s, limit) : s);
    }
    ColumnPtr index(const IColumn & indexes, size_t limit) const override
    {
        if (indexes.size() < limit)
            throw Exception("Size of indexes is less than required.", ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
        return cloneDummy(limit ? limit : s);
    }
    void getPermutation(bool , size_t , int , Permutation & res) const override