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                                                         │
│ -                                                             │
│ -                                                             │
│ -                                                             │
│ -                                                             │
└───────────────────────────────────────────────────────────────┘
```
extern const int ILLEGAL_TYPE_OF_ARGUMENT;
    extern const int BAD_ARGUMENTS;
    extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
    extern const int ILLEGAL_COLUMN;
}
namespace
{
/** transform(x, from_array, to_array[, default]) - convert x according to an explicitly passed match.
  */
/** transform(x, [from...], [to...], default)
  * - converts the values according to the explicitly specified mapping.
  *
  * x - what to transform.
  * from - a constant array of values for the transformation.
  * to - a constant array of values into which values from `from` must be transformed.
  * default - what value to use if x is not equal to any of the values in `from`.
  * `from` and `to` - arrays of the same size.
  *
  * Types:
  * transform(T, Array(T), Array(U), U) -> U
  *
  * transform(x, [from...], [to...])
  * - if `default` is not specified, then for values of `x` for which there is no corresponding element in `from`, the unchanged value of `x` is returned.
  *
  * Types:
  * transform(T, Array(T), Array(T)) -> T
  *
  * Note: the implementation is rather cumbersome.
  */
class FunctionTransform : public IFunction