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.


{
    if (replicate_offsets.empty())
        return cloneEmpty();
    if (typeid_cast<const ColumnUInt8 *>(data.get()))    return replicateNumber<UInt8>(replicate_offsets);
    if (typeid_cast<const ColumnUInt16 *>(data.get()))   return replicateNumber<UInt16>(replicate_offsets);
    if (typeid_cast<const ColumnUInt32 *>(data.get()))   return replicateNumber<UInt32>(replicate_offsets);
    if (typeid_cast<const ColumnUInt64 *>(data.get()))   return replicateNumber<UInt64>(replicate_offsets);
    if (typeid_cast<const ColumnInt8 *>(data.get()))     return replicateNumber<Int8>(replicate_offsets);
    if (typeid_cast<const ColumnInt16 *>(data.get()))    return replicateNumber<Int16>(replicate_offsets);
    if (typeid_cast<const ColumnInt32 *>(data.get()))    return replicateNumber<Int32>(replicate_offsets);
    if (typeid_cast<const ColumnInt64 *>(data.get()))    return replicateNumber<Int64>(replicate_offsets);
    if (typeid_cast<const ColumnFloat32 *>(data.get()))  return replicateNumber<Float32>(replicate_offsets);
    if (typeid_cast<const ColumnFloat64 *>(data.get()))  return replicateNumber<Float64>(replicate_offsets);
    if (typeid_cast<const ColumnString *>(data.get()))   return replicateString(replicate_offsets);
    if (typeid_cast<const ColumnConst *>(data.get()))    return replicateConst(replicate_offsets);
    if (typeid_cast<const ColumnNullable *>(data.get())) return replicateNullable(replicate_offsets);
    if (typeid_cast<const ColumnTuple *>(data.get()))    return replicateTuple(replicate_offsets);
    return replicateGeneric(replicate_offsets);
}
template <typename T>
ColumnPtr ColumnArray::replicateNumber(const Offsets & replicate_offsets) const
{
    size_t col_size = size();
    if (col_size != replicate_offsets.size())
        throw Exception("Size of offsets doesn't match size of column.", ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
    MutableColumnPtr res = cloneEmpty();
    if (0 == col_size)
        return res;