From 62e48c5f3f818d1e841178d7365d208435a63537 Mon Sep 17 00:00:00 2001 From: Mick Semb Wever Date: Wed, 5 Sep 2018 11:13:49 +1000 Subject: [PATCH] Fix incorrect cqlsh results when selecting same columns multiple times Patch by Anthony Grasso; reviewed by Mick Semb Wever for CASSANDRA-13262 --- CHANGES.txt | 1 + bin/cqlsh.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index f3de3885ff..71c57ea297 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.14 + * Fix incorrect cqlsh results when selecting same columns multiple times (CASSANDRA-13262) * Returns null instead of NaN or Infinity in JSON strings (CASSANDRA-14377) 2.2.13 diff --git a/bin/cqlsh.py b/bin/cqlsh.py index e242d4227d..3d0e0565df 100644 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -1313,7 +1313,7 @@ class Shell(cmd.Cmd): # print header only self.print_formatted_result(formatted_names, None) return - formatted_values = [map(self.myformat_value, row.values()) for row in rows] + formatted_values = [map(self.myformat_value, [row[column] for column in column_names]) for row in rows] if self.expand_enabled: self.print_formatted_result_vertically(formatted_names, formatted_values)