mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 01:50:35 +00:00
transport: send back only the requested columns
result_set may contain more columns than user requested (for instance if some of them were needed to properly sort output). The additional columns are always the last ones and are not included in metadata::column_count(). Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <boost/bimap.hpp>
|
||||
#include <boost/assign.hpp>
|
||||
#include <boost/locale/encoding_utf.hpp>
|
||||
#include <boost/range/adaptor/sliced.hpp>
|
||||
|
||||
#include "db/consistency_level.hh"
|
||||
#include "core/future-util.hh"
|
||||
@@ -575,7 +576,7 @@ public:
|
||||
_response->write(rs.get_metadata());
|
||||
_response->write_int(rs.size());
|
||||
for (auto&& row : rs.rows()) {
|
||||
for (auto&& cell : row) {
|
||||
for (auto&& cell : row | boost::adaptors::sliced(0, rs.get_metadata().column_count())) {
|
||||
_response->write_value(cell);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user