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 array_size = sizeAt(n);
    size_t offset = offsetAt(n);
    char * pos = arena.allocContinue(sizeof(array_size), begin);
    memcpy(pos, &array_size, sizeof(array_size));
    StringRef res(pos, sizeof(array_size));
    for (size_t i = 0; i < array_size; ++i)
    {
        auto value_ref = getData().serializeValueIntoArena(offset + i, arena, begin);
        res.data = value_ref.data - res.size;
        res.size += value_ref.size;
    }
    return res;
}
const char * ColumnArray::deserializeAndInsertFromArena(const char * pos)