https://pastila.nl/?00ad187f/ecfb3d92d2e879533cc3aea0536ab3d7

22.3 Exception on client:
Code: 49. DB::Exception: offsets_column has data inconsistent with nested_column: data for INSERT was parsed from query. (LOGICAL_ERROR)

22.7 the insert hangs

21.8.4 Received exception from server (version 21.8.4): Code: 62. DB::Exception: Received from localhost:9000. DB::Exception: Empty query.


{
    size_t offset = offsetAt(n);
    size_t size = sizeAt(n);
    if (size > max_array_size_as_field)
        throw Exception(ErrorCodes::TOO_LARGE_ARRAY_SIZE, "Array of size {} is too large to be manipulated as single field, maximum size {}",
            size, max_array_size_as_field);
    res = Array();
    Array & res_arr = DB::get<Array &>(res);
    res_arr.reserve(size);
    for (size_t i = 0; i < size; ++i)
        res_arr.push_back(getData()[offset + i]);
}
StringRef ColumnArray::getDataAt(size_t n) const
{
    /** Returns the range of memory that covers all elements of the array.
      * Works for arrays of fixed length values.
      * For arrays of strings and arrays of arrays, the resulting chunk of memory may not be one-to-one correspondence with the elements,
      *  since it contains only the data laid in succession, but not the offsets.
      */
    size_t offset_of_first_elem = offsetAt(n);
    StringRef first = getData().getDataAtWithTerminatingZero(offset_of_first_elem);
    size_t array_size = sizeAt(n);
    if (array_size == 0)
        return StringRef(first.data, 0);
    size_t offset_of_last_elem = getOffsets()[n] - 1;
    StringRef last = getData().getDataAtWithTerminatingZero(offset_of_last_elem);
    return StringRef(first.data, last.data + last.size - first.data);
}
bool ColumnArray::isDefaultAt(size_t n) const