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                                                         │
│ -                                                             │
│ -                                                             │
│ -                                                             │
│ -                                                             │
└───────────────────────────────────────────────────────────────┘
```
for (size_t i = 0; i < size; ++i)
            {
                const String & str_from = from[i].get<const String &>();
                StringRef ref{cache.string_pool.insert(str_from.data(), str_from.size() + 1), str_from.size() + 1};
                table[ref] = (*used_to)[i].reinterpret<UInt64>();
            }
        }
        else if (from[0].getType() == Field::Types::String && to[0].getType() == Field::Types::String)
        {
            cache.table_string_to_string = std::make_unique<Cache::StringToString>();
            auto & table = *cache.table_string_to_string;
            for (size_t i = 0; i < size; ++i)
            {
                const String & str_from = from[i].get<const String &>();
                const String & str_to = to[i].get<const String &>();
                StringRef ref_from{cache.string_pool.insert(str_from.data(), str_from.size() + 1), str_from.size() + 1};
                StringRef ref_to{cache.string_pool.insert(str_to.data(), str_to.size() + 1), str_to.size() + 1};
                table[ref_from] = ref_to;
            }
        }
        cache.initialized = true;
    }
};
}
void registerFunctionTransform(FunctionFactory & factory)
{
    factory.registerFunction<FunctionTransform>();
}
}