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                                                         │
│ -                                                             │
│ -                                                             │
│ -                                                             │
│ -                                                             │
└───────────────────────────────────────────────────────────────┘
```
current_dst_default_offset = dst_default_offsets[i];
            dst_offsets[i] = current_dst_offset;
        }
    }
    
    struct Cache
    {
        using NumToNum = HashMap<UInt64, UInt64, HashCRC32<UInt64>>;
        using NumToString = HashMap<UInt64, StringRef, HashCRC32<UInt64>>;     
        using StringToNum = HashMap<StringRef, UInt64, StringRefHash>;
        using StringToString = HashMap<StringRef, StringRef, StringRefHash>;
        std::unique_ptr<NumToNum> table_num_to_num;
        std::unique_ptr<NumToString> table_num_to_string;
        std::unique_ptr<StringToNum> table_string_to_num;
        std::unique_ptr<StringToString> table_string_to_string;
        Arena string_pool;
        Field const_default_value;    
        std::atomic<bool> initialized{false};
        std::mutex mutex;
    };
    mutable Cache cache;
    
    void initialize(const Array & from, const Array & to, const ColumnsWithTypeAndName & arguments) const
    {
        if (cache.initialized)
            return;
        const size_t size = from.size();
        if (0 == size)
            throw Exception{"Empty arrays are illegal in function " + getName(), ErrorCodes::BAD_ARGUMENTS};
        std::lock_guard lock(cache.mutex);