mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
treewide: require type for comparing cells
This commit is contained in:
@@ -62,7 +62,7 @@ public:
|
||||
bytes_view serialize() const {
|
||||
return _data;
|
||||
}
|
||||
bool operator==(const atomic_cell_or_collection& other) const {
|
||||
bool equals(const abstract_type& type, const atomic_cell_or_collection& other) const {
|
||||
return _data == other._data;
|
||||
}
|
||||
size_t external_memory_usage(const abstract_type&) const {
|
||||
|
||||
@@ -1513,8 +1513,11 @@ bool row::equal(column_kind kind, const schema& this_schema, const row& other, c
|
||||
auto cells_equal = [&] (std::pair<column_id, const atomic_cell_or_collection&> c1,
|
||||
std::pair<column_id, const atomic_cell_or_collection&> c2) {
|
||||
static_assert(schema::row_column_ids_are_ordered_by_name::value, "Relying on column ids being ordered by name");
|
||||
return this_schema.column_at(kind, c1.first).name() == other_schema.column_at(kind, c2.first).name()
|
||||
&& c1.second == c2.second;
|
||||
auto& at1 = *this_schema.column_at(kind, c1.first).type;
|
||||
auto& at2 = other_schema.column_at(kind, c2.first).type;
|
||||
return at1.equals(at2)
|
||||
&& this_schema.column_at(kind, c1.first).name() == other_schema.column_at(kind, c2.first).name()
|
||||
&& c1.second.equals(at1, c2.second);
|
||||
};
|
||||
return with_both_ranges(other, [&] (auto r1, auto r2) {
|
||||
return boost::equal(r1, r2, cells_equal);
|
||||
|
||||
Reference in New Issue
Block a user