```
SELECT
    CAST(([2, 1, 1023], ['', '']), 'Map(UInt8, String)') AS map,
    map[10]
```

Triggers `Assertion 'n < size()' failed` in `DB::ColumnString::operator[](unsigned long)`
https://clickhouse-test-reports.s3.yandex.net/18481/64c4ade5b0e0c9a13d6c2475431daf431fc97554/fuzzer/fuzzer.log

Introduced here: #17829
First found here: #18481
{
        writeDateTimeText(x, wb, *time_zone);
    }
};
template <>
struct FormatImpl<DataTypeDateTime64>
{
    static void execute(const DataTypeDateTime64::FieldType x, WriteBuffer & wb, const DataTypeDateTime64 * type, const DateLUTImpl * time_zone)
    {
        writeDateTimeText(DateTime64(x), type->getScale(), wb, *time_zone);
    }
};
template <typename FieldType>
struct FormatImpl<DataTypeEnum<FieldType>>
{
    static void execute(const FieldType x, WriteBuffer & wb, const DataTypeEnum<FieldType> * type, const DateLUTImpl *)
    {
        writeString(type->getNameForValue(x), wb);
    }
};
template <typename FieldType>
struct FormatImpl<DataTypeDecimal<FieldType>>
{
    static void execute(const FieldType x, WriteBuffer & wb, const DataTypeDecimal<FieldType> * type, const DateLUTImpl *)