Merge branch 'dev/penberg/query-local-fixes' from seastar-dev.git

Cleanups from Pekka.
This commit is contained in:
Tomasz Grabiec
2015-04-30 10:12:27 +02:00

View File

@@ -1216,12 +1216,14 @@ storage_proxy::query_local(const sstring& ks_name, const sstring& cf_name, const
std::vector<query::clustering_range> row_ranges = {query::clustering_range::make_open_ended_both_sides()};
std::vector<column_id> regular_cols;
boost::range::push_back(regular_cols, schema->regular_columns() | boost::adaptors::transformed([] (auto&& col) { return col.id; }));
std::vector<column_id> static_cols;
boost::range::push_back(static_cols, schema->static_columns() | boost::adaptors::transformed([] (auto&& col) { return col.id; }));
auto opts = query::partition_slice::option_set::of<
query::partition_slice::option::send_partition_key>();
query::partition_slice slice{row_ranges, {}, regular_cols, opts};
query::partition_slice::option::send_partition_key,
query::partition_slice::option::send_clustering_key>();
query::partition_slice slice{row_ranges, static_cols, regular_cols, opts};
std::vector<query::partition_range> pr = {query::partition_range::make_open_ended_both_sides()};
auto id = db.find_uuid(ks_name, cf_name);
auto cmd = make_lw_shared<query::read_command>(id, pr, slice, std::numeric_limits<uint32_t>::max());
auto cmd = make_lw_shared<query::read_command>(schema->id(), pr, slice, std::numeric_limits<uint32_t>::max());
return db.query(*cmd).then([key, schema, slice](lw_shared_ptr<query::result>&& result) {
query::result_set_builder builder{schema};
bytes_ostream w(result->buf());