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.


{
    const ColumnArray & rhs = assert_cast<const ColumnArray &>(rhs_);
    
    size_t lhs_size = sizeAt(n);
    size_t rhs_size = rhs.sizeAt(m);
    size_t min_size = std::min(lhs_size, rhs_size);
    for (size_t i = 0; i < min_size; ++i)
    {
        int res;
        if (collator)
            res = getData().compareAtWithCollation(offsetAt(n) + i, rhs.offsetAt(m) + i, *rhs.data.get(), nan_direction_hint, *collator);
        else
            res = getData().compareAt(offsetAt(n) + i, rhs.offsetAt(m) + i, *rhs.data.get(), nan_direction_hint);
        if (res)
            return res;
    }
    return lhs_size < rhs_size
        ? -1
        : (lhs_size == rhs_size
            ? 0
            : 1);
}
int ColumnArray::compareAt(size_t n, size_t m, const IColumn & rhs_, int nan_direction_hint) const