https://clickhouse-test-reports.s3.yandex.net/19673/e7de5f34b1b3ae5d6d4e5d96ba0cd7c45acfb329/fuzzer_ubsan/server.log

**Describe the bug**
```
milovidov-desktop :) SELECT transform(number / 2, [0.5, 1.5], ['Hello', 'World'], '-') FROM numbers(10)

SELECT transform(number / 2, [0.5, 1.5], ['Hello', 'World'], '-')
FROM numbers(10)

Query id: f8c2646e-e234-41ae-85ef-7a452d4a2545

┌─transform(divide(number, 2), [0.5, 1.5], ['Hello', 'World'], '-')─┐
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
│ -                                                                 │
└───────────────────────────────────────────────────────────────────┘

10 rows in set. Elapsed: 0.003 sec. 

milovidov-desktop :) SELECT transform(number / 2, [1, 2], ['Hello', 'World'], '-') FROM numbers(10)

SELECT transform(number / 2, [1, 2], ['Hello', 'World'], '-')
FROM numbers(10)

Query id: 18b64dcf-983e-4653-a62b-5501e18314fd

┌─transform(divide(number, 2), [1, 2], ['Hello', 'World'], '-')─┐
│ -                                                             │
│ -                                                             │
│ Hello                                                         │
│ Hello                                                         │
│ World                                                         │
│ World                                                         │
│ -                                                             │
│ -                                                             │
│ -                                                             │
│ -                                                             │
└───────────────────────────────────────────────────────────────┘
```
if (cache.initialized)
            return;
        if (size != to.size())
            throw Exception{"Second and third arguments of function " + getName() + " must be arrays of same size", ErrorCodes::BAD_ARGUMENTS};
        Array converted_to;
        const Array * used_to = &to;
        
        if (arguments.size() == 4)
        {
            const IColumn * default_col = arguments[3].column.get();
            const ColumnConst * const_default_col = typeid_cast<const ColumnConst *>(default_col);
            if (const_default_col)
                cache.const_default_value = (*const_default_col)[0];
            
            bool default_col_is_float =
                   checkColumn<ColumnFloat32>(default_col)
                || checkColumn<ColumnFloat64>(default_col)
                || checkColumnConst<ColumnFloat32>(default_col)
                || checkColumnConst<ColumnFloat64>(default_col);
            bool to_is_float = to[0].getType() == Field::Types::Float64;
            if (default_col_is_float && !to_is_float)
            {
                converted_to.resize(size);
                for (size_t i = 0; i < size; ++i)
                    converted_to[i] = applyVisitor(FieldVisitorConvertToNumber<Float64>(), to[i]);
                used_to = &converted_to;
            }
            else if (!default_col_is_float && to_is_float)
            {
                if (const_default_col)