Fix incorrect cqlsh results when selecting same columns multiple times

This commit is contained in:
Murukesh Mohanan 2017-03-13 14:18:03 +09:00 committed by Stefan Podkowinski
parent 931e3a4d3b
commit aaf2011287
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
4.0
* Fix incorrect cqlsh results when selecting same columns multiple times (CASSANDRA-13262)
* Fix WriteResponseHandlerTest is sensitive to test execution order (CASSANDRA-13421)
* Improve incremental repair logging (CASSANDRA-13468)
* Start compaction when incremental repair finishes (CASSANDRA-13454)

View File

@ -1117,7 +1117,7 @@ class Shell(cmd.Cmd):
ks_meta = self.conn.metadata.keyspaces.get(ks_name, None)
cql_types = [CqlType(cql_typename(t), ks_meta) for t in result.column_types]
formatted_values = [map(self.myformat_value, row.values(), cql_types) for row in result.current_rows]
formatted_values = [map(self.myformat_value, [row[c] for c in column_names], cql_types) for row in result.current_rows]
if self.expand_enabled:
self.print_formatted_result_vertically(formatted_names, formatted_values)