mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
Merge branch 'penberg/schema-merging-fixes' from seastar-dev.git
From Pekka: "This series fixes two issues in schema merging code that caused cql_query_test to sometimes think that two identical keyspaces are different. This forced the code to use the alter keyspace paths which are not implemented and just throw an exception."
This commit is contained in:
@@ -403,7 +403,7 @@ std::vector<const char*> ALL { KEYSPACES, COLUMNFAMILIES, COLUMNS, TRIGGERS, USE
|
||||
auto schema = proxy.get_db().local().find_schema(system_keyspace::NAME, schema_table_name);
|
||||
auto map = [&proxy, schema_table_name] (sstring keyspace_name) { return read_schema_partition_for_keyspace(proxy, schema_table_name, keyspace_name); };
|
||||
auto insert = [] (schema_result&& result, auto&& schema_entity) {
|
||||
if (schema_entity.second) {
|
||||
if (!schema_entity.second->empty()) {
|
||||
result.insert(std::move(schema_entity));
|
||||
}
|
||||
return std::move(result);
|
||||
|
||||
@@ -6,6 +6,22 @@
|
||||
|
||||
namespace query {
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const result_set_row& row) {
|
||||
for (auto&& cell : row._cells) {
|
||||
auto&& type = cell.second.type();
|
||||
auto&& value = cell.second.value();
|
||||
out << cell.first << "=\"" << type->decompose(value) << "\" ";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const result_set& rs) {
|
||||
for (auto&& row : rs._rows) {
|
||||
out << row << std::endl;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
result_set_builder::result_set_builder(schema_ptr schema)
|
||||
: _schema{schema}
|
||||
{ }
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
}
|
||||
friend inline bool operator==(const result_set_row& x, const result_set_row& y);
|
||||
friend inline bool operator!=(const result_set_row& x, const result_set_row& y);
|
||||
friend std::ostream& operator<<(std::ostream& out, const result_set_row& row);
|
||||
};
|
||||
|
||||
inline bool operator==(const result_set_row& x, const result_set_row& y) {
|
||||
@@ -88,6 +89,7 @@ public:
|
||||
return _rows[idx];
|
||||
}
|
||||
friend inline bool operator==(const result_set& x, const result_set& y);
|
||||
friend std::ostream& operator<<(std::ostream& out, const result_set& rs);
|
||||
};
|
||||
|
||||
inline bool operator==(const result_set& x, const result_set& y) {
|
||||
|
||||
2
types.hh
2
types.hh
@@ -308,7 +308,7 @@ public:
|
||||
|
||||
inline bool operator==(const data_value& x, const data_value& y)
|
||||
{
|
||||
return x._type == y._type && x._type->equal(x._type->decompose(x._value), y._type->decompose(y._value));
|
||||
return x._type->equals(y._type) && x._type->equal(x._type->decompose(x._value), y._type->decompose(y._value));
|
||||
}
|
||||
|
||||
inline bool operator!=(const data_value& x, const data_value& y)
|
||||
|
||||
Reference in New Issue
Block a user