Repository: cassandra
Updated Branches:
  refs/heads/trunk 931e3a4d3 -> aaf201128


Fix incorrect cqlsh results when selecting same columns multiple times


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/aaf20112
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/aaf20112
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/aaf20112

Branch: refs/heads/trunk
Commit: aaf201128764cc27905837c1882800c5ae542769
Parents: 931e3a4
Author: Murukesh Mohanan <[email protected]>
Authored: Mon Mar 13 14:18:03 2017 +0900
Committer: Stefan Podkowinski <[email protected]>
Committed: Thu May 4 19:56:03 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aaf20112/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 657cb28..ed69d14 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aaf20112/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index 28e8043..4e634ca 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -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)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to