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.


res_offsets.reserve(result_size_hint > 0 ? result_size_hint : size);
    size_t current_offset = 0;
    for (size_t i = 0; i < size; ++i)
    {
        if (filt[i])
        {
            current_offset += sizeAt(i);
            res_offsets.push_back(current_offset);
        }
    }
    return res;
}
ColumnPtr ColumnArray::filterNullable(const Filter & filt, ssize_t result_size_hint) const
{
    if (getOffsets().empty())
        return ColumnArray::create(data);
    const ColumnNullable & nullable_elems = assert_cast<const ColumnNullable &>(*data);
    auto array_of_nested = ColumnArray::create(nullable_elems.getNestedColumnPtr(), offsets);
    auto filtered_array_of_nested_owner = array_of_nested->filter(filt, result_size_hint);
    const auto & filtered_array_of_nested = assert_cast<const ColumnArray &>(*filtered_array_of_nested_owner);
    const auto & filtered_offsets = filtered_array_of_nested.getOffsetsPtr();
    auto res_null_map = ColumnUInt8::create();
    filterArraysImplOnlyData(nullable_elems.getNullMapData(), getOffsets(), res_null_map->getData(), filt, result_size_hint);
    return ColumnArray::create(
        ColumnNullable::create(
            filtered_array_of_nested.getDataPtr(),
            std::move(res_null_map)),
        filtered_offsets);
}
ColumnPtr ColumnArray::filterTuple(const Filter & filt, ssize_t result_size_hint) const